Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346984 - Platform.startup() swallows exception
Summary: Platform.startup() swallows exception
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.6.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7.0 RC4   Edit
Assignee: Ruo Yin CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard:
Keywords:
: 357314 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-24 09:43 EDT by Aaron Digulla CLA
Modified: 2011-10-28 05:06 EDT (History)
2 users (show)

See Also:


Attachments
Patch for related problems in OSGILauncher.java (1.25 KB, patch)
2011-05-25 04:31 EDT, Aaron Digulla CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***