Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346984

Summary: Platform.startup() swallows exception
Product: z_Archived Reporter: Aaron Digulla <digulla>
Component: BIRTAssignee: Ruo Yin <ruo.yin>
Status: RESOLVED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, mike
Version: 2.6.2   
Target Milestone: 3.7.0 RC4   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch for related problems in OSGILauncher.java none

Description Aaron Digulla CLA 2011-05-24 09:43:52 EDT
In org.eclipse.birt.core.framework.Platform, the method startup() uses the wrong constructor to build a BirtException.

The code looks like so:

throw new BirtException( "org.eclipse.birt.core",
ResourceConstants.CANNOT_STARTUP_OSGI_PLATFORM, ex );

This makes "ex" an Object argument to the message CANNOT_STARTUP_OSGI_PLATFORM instead of copying it into the cause field.

Replace these two lines with

throw new BirtException( "org.eclipse.birt.core",
ResourceConstants.CANNOT_STARTUP_OSGI_PLATFORM, new Object[0], ex );
Comment 1 Aaron Digulla CLA 2011-05-25 04:31:18 EDT
Created attachment 196518 [details]
Patch for related problems in OSGILauncher.java

This patch fixes two broken error messages in OSGILauncher.java

Together with the patch in comment #1, this gives users much better error messages when startup fails because the config hasn't been set up correctly.
Comment 2 Ruo Yin CLA 2011-06-02 03:49:25 EDT
Correct constructor used
Comment 3 Gang Liu CLA 2011-10-28 05:06:52 EDT
*** Bug 357314 has been marked as a duplicate of this bug. ***