 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Michael Thelen Guest
|
Posted: Tue Jan 18, 2005 2:41 pm Post subject: JBuilder 2005 Exception Breakpoint |
|
|
Hello!
I have the following problem. If I have exception, that I catch within
the code there is nothing shown in the debug-mode. But not all my caught
excepions print out something readable. So I tried to define my onw
exception breakpoint, but I don't get stacktrace nor any other
information on the exception.
Is there any chance to set this up within Jbuilder or do I always need
to put something like <ex.printStackTrace(System.err);> within the catch
block.
Thanks for help!
Mike
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Tue Jan 18, 2005 6:27 pm Post subject: Re: JBuilder 2005 Exception Breakpoint |
|
|
As far as I know, setting an exception breakpoint doesn't actually give you
access to the exception itself (stack trace, etc). I agree with you that it
would be a good idea. I've submitted it as a request for enhancement.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
"Michael Thelen" <der (AT) michi-ist (DOT) net> wrote
| Quote: | Hello!
I have the following problem. If I have exception, that I catch within the
code there is nothing shown in the debug-mode. But not all my caught
excepions print out something readable. So I tried to define my onw
exception breakpoint, but I don't get stacktrace nor any other information
on the exception.
Is there any chance to set this up within Jbuilder or do I always need to
put something like <ex.printStackTrace(System.err);> within the catch
block.
Thanks for help!
Mike
|
|
|
| Back to top |
|
 |
Michael Thelen Guest
|
Posted: Tue Jan 18, 2005 9:06 pm Post subject: Re: JBuilder 2005 Exception Breakpoint |
|
|
Kevin Dean [TeamB] wrote:
| Quote: | As far as I know, setting an exception breakpoint doesn't actually give you
access to the exception itself (stack trace, etc). I agree with you that it
would be a good idea. I've submitted it as a request for enhancement.
Huuuh, can't believe that there isn't a way. You can evaluate an |
expression, if you set up a new breakpoint. But indeed there an no
implicit objects like i.e. in JSP. There is no information about that in
the JBuilder help.
But there must be an advantage of using the debug-mode. If I have to
introduce a debug variable, I would need to set it to false in all Java
classes or I will have the overhead after compiling.
Is there a possibilty to only have code executed in debug mode and in
normal mode it is not compiled, like in VC++? What is a standard way of
handling something like this?
Greets
Mike
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Wed Jan 19, 2005 3:10 am Post subject: Re: JBuilder 2005 Exception Breakpoint |
|
|
Unfortunately, Java doesn't really have any concept of conditional
compilation.
A thought that occurred to me is that at least the stack trace is visible
when you stop on an exception breakpoint. It's not perfect, but the stack
frame tab in the debugger should give you some information.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
"Michael Thelen" <der (AT) michi-ist (DOT) net> wrote
| Quote: | Kevin Dean [TeamB] wrote:
As far as I know, setting an exception breakpoint doesn't actually give
you access to the exception itself (stack trace, etc). I agree with you
that it would be a good idea. I've submitted it as a request for
enhancement.
Huuuh, can't believe that there isn't a way. You can evaluate an
expression, if you set up a new breakpoint. But indeed there an no
implicit objects like i.e. in JSP. There is no information about that in
the JBuilder help.
But there must be an advantage of using the debug-mode. If I have to
introduce a debug variable, I would need to set it to false in all Java
classes or I will have the overhead after compiling.
Is there a possibilty to only have code executed in debug mode and in
normal mode it is not compiled, like in VC++? What is a standard way of
handling something like this?
Greets
Mike
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|