From: Mark Wielaard <mark@klomp.org>
To: mauve-patches@sources.redhat.com
Subject: FYI: Improve stack trace output a little
Date: Sun, 26 Nov 2006 23:11:00 -0000 [thread overview]
Message-ID: <1164582695.10461.80.camel@dijkstra.wildebeest.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 898 bytes --]
Hi,
We would only use the exception class name, but it is better to use the
whole exception, including the message.
2006-11-26 Mark Wielaard <mark@klomp.org>
* RunnerProcess.java (getStackTraceString): Use whole exception
message, not just the class name.
Committed,
Mark
diff -u -r1.15 RunnerProcess.java
--- RunnerProcess.java 13 Oct 2006 11:45:42 -0000 1.15
+++ RunnerProcess.java 26 Nov 2006 23:09:10 -0000
@@ -395,7 +395,7 @@
private static String getStackTraceString(Throwable ex, String pad)
{
StackTraceElement[] st = ex.getStackTrace();
- StringBuffer sb = new StringBuffer(pad + ex.getClass().getName() + "\n");
+ StringBuffer sb = new StringBuffer(pad + ex.toString() + "\n");
for (int i = 0; i < st.length; i++)
sb.append(pad + "at " + st[i].toString() + "\n");
sb.setLength(sb.length() - 1);
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2006-11-26 23:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1164582695.10461.80.camel@dijkstra.wildebeest.org \
--to=mark@klomp.org \
--cc=mauve-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).