Bug 67289 - UIPerformChangeOperation swallows exception stacktrace [refactoring]
Summary: UIPerformChangeOperation swallows exception stacktrace [refactoring]
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1   Edit
Assignee: Dirk Baeumer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-15 12:25 EDT by Markus Keller CLA
Modified: 2005-04-27 16:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-06-15 12:25:11 EDT
200406111814

UIPerformChangeOperation#executeChange() swallows the exceptions thrown during
change execution:

   throw new CoreException(exception[0].getStatus());

... drops the (very informative) stacktrace of exception[0].
Since CoreExceptions cannot be nested, either a nestable subclass of
CoreException should be thrown or ...

	IStatus status= exception[0].getStatus();
	throw new CoreException(new MultiStatus(
		status.getPlugin(), status.getCode(), new IStatus[]{status},
		status.getMessage(), exception[0]));

... should be used.
Comment 1 Dirk Baeumer CLA 2004-06-15 13:09:25 EDT
Good catch. 
Comment 2 Dirk Baeumer CLA 2005-04-27 16:39:17 EDT
Fixed. The exception now contains the root cause of the problem and the stack is
correctlz printed to the console.