Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse: debuging the mountain-climbing-way
Eclipse: debuging the mountain-climbing-way [message #436335] Tue, 06 September 2005 11:50 Go to next message
Eclipse UserFriend
Originally posted by: dutz.c-ware.de

Hi,

I am working on a RCP application for quite a while now and have run
into the same problem several times now. What is the reason for using
these anoying try-finally blocks without even one catch? This is realy
anoying when debuging an application. There seems to be no way of
finding the reason for an exception if it is simply thrown away. At the
moment I step through the entire code seting breakpoints at the current
position and removing the ones bevore. This is sort of
Mointain-Climbing-Debugging and it realy suxx.

Is there any way to debug a plugin in a more professional way?

Christofer Dutz
Re: Eclipse: debuging the mountain-climbing-way [message #436339 is a reply to message #436335] Tue, 06 September 2005 14:04 Go to previous messageGo to next message
Ed Burnette is currently offline Ed BurnetteFriend
Messages: 279
Registered: July 2009
Senior Member
Could you name a few examples?
Re: Eclipse: debuging the mountain-climbing-way [message #436362 is a reply to message #436335] Wed, 07 September 2005 12:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Christofer Dutz wrote:

> Hi,
>
> I am working on a RCP application for quite a while now and have run
> into the same problem several times now. What is the reason for using
> these anoying try-finally blocks without even one catch?

There are many good reasons to do so. What's bad are empty catch blocks.

> This is realy anoying when debuging an application. There seems to be
> no way of finding the reason for an exception if it is simply thrown
> away. At the moment I step through the entire code seting breakpoints
> at the current position and removing the ones bevore. This is sort of
> Mointain-Climbing-Debugging and it realy suxx.
>
> Is there any way to debug a plugin in a more professional way?

Simply tell the Debugger to stop when an given exception occurs. If you
don't know which one it is start with the most specific you suspect
(e.g. exceptionally).

Dani

>
> Christofer Dutz
Re: Eclipse: debuging the mountain-climbing-way [message #436414 is a reply to message #436335] Wed, 07 September 2005 18:04 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
A 'try/finally' block does /not/ throw the exception away. The code abnormally exits in the middle of the try block, then the finally block is executed (often doing some kind of cleanup), then the exception is propagated outwards as normal. It doesn't affect anything that may be expecting an exception; it will still be reported.
Re: Eclipse: debuging the mountain-climbing-way [message #436521 is a reply to message #436339] Sun, 11 September 2005 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dutz.c-ware.de

Ed Burnette wrote:
> Could you name a few examples?

Sorry for the late reply, but I was sick this week :(

Unfortunately I didn't write up the exact locations, but I found try
blocks with finally without any chatch all over the place.

Chris
Re: Eclipse: debuging the mountain-climbing-way [message #436522 is a reply to message #436362] Sun, 11 September 2005 12:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dutz.c-ware.de

Daniel Megert wrote:
> Christofer Dutz wrote:
>
>> Hi,
>>
>> I am working on a RCP application for quite a while now and have run
>> into the same problem several times now. What is the reason for using
>> these anoying try-finally blocks without even one catch?
>
>
> There are many good reasons to do so. What's bad are empty catch blocks.

Well how about a log-output of type debug? Since Eclipse is not a
finished Product I think this could help a lot of development problems.

>> This is realy anoying when debuging an application. There seems to be
>> no way of finding the reason for an exception if it is simply thrown
>> away. At the moment I step through the entire code seting breakpoints
>> at the current position and removing the ones bevore. This is sort of
>> Mointain-Climbing-Debugging and it realy suxx.
>>
>> Is there any way to debug a plugin in a more professional way?
>
>
> Simply tell the Debugger to stop when an given exception occurs. If you
> don't know which one it is start with the most specific you suspect
> (e.g. exceptionally).

Heheh ... have you tried that? I have and I ended up in all sorts of
places ;)

Christofer Dutz

> Dani
>
>>
>> Christofer Dutz
Re: Eclipse: debuging the mountain-climbing-way [message #436523 is a reply to message #436414] Sun, 11 September 2005 12:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dutz.c-ware.de

Alex Blewitt wrote:
> A 'try/finally' block does /not/ throw the exception away. The code abnormally exits in the middle of the try block, then the finally block is executed (often doing some kind of cleanup), then the exception is propagated outwards as normal. It doesn't affect anything that may be expecting an exception; it will still be reported.

Hmmm ... that was what I first thought too. Unfortunately I step through
the eclipse code and suddenly I jump into the finally block and after
that no Exception is to be found anymore. Where has it gone?

Chris
Re: Eclipse: debuging the mountain-climbing-way [message #436533 is a reply to message #436523] Mon, 12 September 2005 13:00 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
It goes up the call stack to whoever called that method. If you do the 'step into' instead of 'step over' you should be able to track the caller and see how the caller handles the exception.
Previous Topic:Re: progress view for jobs is showing in My RCP app , only when i include org.eclipse.ui.ide or org
Next Topic:Detached window or view with menu bar in RCP app?
Goto Forum:
  


Current Time: Sun Dec 08 01:05:42 GMT 2024

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

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

Back to the top