ThreadGroup.java (uncaughtException): Print message to System.err.

* java/lang/ThreadGroup.java (uncaughtException): Print message to
	System.err.  Required by spec.

From-SVN: r47779
This commit is contained in:
Tom Tromey 2001-12-07 23:32:24 +00:00 committed by Tom Tromey
parent d0c250155a
commit cb47fb054c
2 changed files with 7 additions and 3 deletions

View file

@ -1,5 +1,8 @@
2001-12-07 Tom Tromey <tromey@redhat.com>
* java/lang/ThreadGroup.java (uncaughtException): Print message to
System.err. Required by spec.
* verify.cc (_Jv_BytecodeVerifier::branch_prepass): Set start_PC
earlier, for error handling.
(_Jv_BytecodeVerifier::note_branch_target): Fixed branch target

View file

@ -510,17 +510,18 @@ public class ThreadGroup
else if (! (t instanceof ThreadDeath))
{
if (thread != null)
System.out.print("Exception in thread \"" + thread.getName() + "\" ");
System.err.print ("Exception in thread \""
+ thread.getName() + "\" ");
try
{
t.printStackTrace();
t.printStackTrace(System.err);
}
catch (Throwable x)
{
// This means that something is badly screwed up with the runtime,
// or perhaps someone is messing with the SecurityManager. In any
// case, try to deal with it gracefully.
System.out.println(t);
System.err.println(t);
System.err.println("*** Got " + x.toString() +
" while trying to print stack trace");
}