Bug 4461 - SWTException should overwrite printStackTrace(..) (1GLDW6P)
Summary: SWTException should overwrite printStackTrace(..) (1GLDW6P)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Mike Wilson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:17 EDT by Eduardo Pereira CLA
Modified: 2002-03-07 10:20 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Pereira CLA 2001-10-11 14:17:10 EDT
Exception that wrap other exception such as ClassNotFoundException,
	ExceptionInInitializerError, ExceptionInInitializerError, etc, overwrite the
	printStackTrace(...) methods to print the wrapped exception.

	SWTException should to the same.

	Because users need to see SWTException.throwable, they are hacking Workbench to do:

if (e instanceof SWTException) {
	SWTException swt= (SWTException)e;
	Throwable t= swt.throwable;
	if (t != null) {
		t.printStackTrace();
	}
}
	

NOTES:
Comment 1 Mike Wilson CLA 2001-12-10 12:13:13 EST
We modified "printStackTrace()" to print the trace for the enclosed exception. 
We did not modify the versions of this method which take an argument (i.e. the 
PrintWriter or PrintStream version) because this would break compatibility 
with J2ME.