Skip to main content



      Home
Home » Newcomers » Newcomers » No runtimeexception console output
No runtimeexception console output [message #244442] Wed, 02 January 2008 05:53 Go to next message
Eclipse UserFriend
Originally posted by: kai.kai.kai

Hello!

I just started writing a little RCP Application with Eclipse. I am pretty
new to RCP programming and also to Eclipse.

Now I have a problem with the following little scenario:
When I put a "thow new RuntimeException()" into Perspective.java for
example, the program exits as exspected and the RuntimeException is shown
on the console output.
But when I create a new Action (implementing IWorkbenchAction) for a menu
item, that should open a TitleAreaDialog and then throw a
RuntimeExcepction inside that Dialog (maybe in the overriden method
createDialogArea), the Dialog never shows up and no output appears on the
console.

The only thing, that I can think of, is that TitleAreaDialog is created in
a new thread, and that thread stops, but outputs it's RuntimeException to
another pipe,
that is not observed by the normal Eclipse console.

This makes manual debugging (without debugger) hard. Is there a
possibility to get those Exceptions on the Eclipse console as well?
Re: No runtimeexception console output [message #244460 is a reply to message #244442] Wed, 02 January 2008 08:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Kai,

Is it possible the exception is being logged so it appears in
<workspace>/.metadata/.log. Are you running with -consolelog so that
all logged exceptions are also printed to the console?


Kai Schlamp wrote:
> Hello!
>
> I just started writing a little RCP Application with Eclipse. I am
> pretty new to RCP programming and also to Eclipse.
>
> Now I have a problem with the following little scenario:
> When I put a "thow new RuntimeException()" into Perspective.java for
> example, the program exits as exspected and the RuntimeException is
> shown on the console output.
> But when I create a new Action (implementing IWorkbenchAction) for a
> menu item, that should open a TitleAreaDialog and then throw a
> RuntimeExcepction inside that Dialog (maybe in the overriden method
> createDialogArea), the Dialog never shows up and no output appears on
> the console.
>
> The only thing, that I can think of, is that TitleAreaDialog is
> created in a new thread, and that thread stops, but outputs it's
> RuntimeException to another pipe,
> that is not observed by the normal Eclipse console.
>
> This makes manual debugging (without debugger) hard. Is there a
> possibility to get those Exceptions on the Eclipse console as well?
Re: No runtimeexception console output [message #244469 is a reply to message #244460] Wed, 02 January 2008 08:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kai.kai.kai

> Is it possible the exception is being logged so it appears in
> <workspace>/.metadata/.log. Are you running with -consolelog so that
> all logged exceptions are also printed to the console?

No, I am not running Eclipse with -consolelog parameter, nor is the
exception logged in the .log file.
It simply doesn't appear anywhere, when it is thrown by the action
executed dialog (as already said, thrown at other positions it appears in
the console).
Perhaps I should report this to the platform group, even I don't think
this is any RCP specific.

Kai
Re: No runtimeexception console output [message #244474 is a reply to message #244469] Wed, 02 January 2008 09:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Kai,

Set a breakpoint on the exception and see how it's handled. If it's
literally being discarded, that would seem like a reasonable bugzilla to
open.


Kai Schlamp wrote:
>> Is it possible the exception is being logged so it appears in
>> <workspace>/.metadata/.log. Are you running with -consolelog so that
>> all logged exceptions are also printed to the console?
>
> No, I am not running Eclipse with -consolelog parameter, nor is the
> exception logged in the .log file.
> It simply doesn't appear anywhere, when it is thrown by the action
> executed dialog (as already said, thrown at other positions it appears
> in the console).
> Perhaps I should report this to the platform group, even I don't think
> this is any RCP specific.
>
> Kai
>
>
Re: No runtimeexception console output [message #244486 is a reply to message #244474] Wed, 02 January 2008 09:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kai.kai.kai

Hy Ed.
Ok, I just used the debugger to track that problem.
It seems, that such runtime exceptions are not handled and not reported,
when the debug mode (WorkbenchPlugin.DEBUG) for plugin development is off.
So it seems to be the correct the correct behavior.
Now I have to find out how to enable the plugin debug mode.
Thanks a lot Ed for guiding me in my early eclipse days :-)
Re: No runtimeexception console output [message #244490 is a reply to message #244486] Wed, 02 January 2008 10:00 Go to previous message
Eclipse UserFriend
Originally posted by: kai.kai.kai

If someone is still interested (perhaps a future reader):
The debug mode I mentioned in my last message could be activated within
the tracing tab in the run dialog.
Just activate org.eclipse.ui.workbench and make sure debug is checked.

Kai
Previous Topic:org.eclipse.swt api documentation
Next Topic:AST Parser and and org.eclipse.core.runtime.jobs
Goto Forum:
  


Current Time: Tue Jul 22 15:35:42 EDT 2025

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

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

Back to the top