Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Capture an exception
Capture an exception [message #171469] Thu, 15 June 2006 03:46 Go to next message
Eclipse UserFriend
Originally posted by: dmsubs.NOSPAM.consertum.com

Hi,

I am programmatically loading a plugin from the start() method in my
wizard. The plugin is (validly) throwing an Exception that I would like
to capture so that I can display a meaningful error message. However, it
seems to be caught elsewhere and reported as "Problem Opening Wizard" in
MyWizard displayed as a message box with a generic (and unhelpful) error
message.

MyWizard code looks like this:
public void start (BundleContext context) throws Exception {
...
try {
myPlugin = new MyPlugin() ;
} catch (Exception ex) {
// never gets here
}
}
and MyPlugin looks like this

public void start (BundleContext context) throws Exception {
...
if (problemDetected)
throw Exception("Problem found") ;
...
}

Any ideas on how to capture this?


[Originally posted on eclipse.platform, but no response, hence posting here]

Thanks,

--
Derek
Re: Capture an exception [message #171735 is a reply to message #171469] Fri, 23 June 2006 03:57 Go to previous message
Eclipse UserFriend
Originally posted by: tinamakin.hotmail.com

Hey

Try to find out if instantiating a plugin class causes the start() to be
invoked.
You can debug the application setting a a breakpoint on the line where
MyPlugin class is instantiated.

Krayon
Previous Topic:writing a custom launcher
Next Topic:Is it possible for CDT Parser to ignore header files?
Goto Forum:
  


Current Time: Mon Jul 07 20:14:25 EDT 2025

Powered by FUDForum. Page generated in 0.05612 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top