This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179618 - Can we have break on ALL exceptions ?
Summary: Can we have break on ALL exceptions ?
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Assignee: issues@debugger
Depends on:
Reported: 2010-01-18 04:10 UTC by AndezFernandez
Modified: 2012-10-16 13:31 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description AndezFernandez 2010-01-18 04:10:55 UTC
When entering a new breakpoint to break on an exception, you need to know the exact package/class exception name.  For example, if I want to catch a NullPointerException, then I create a New Breakpoint and enter java.lang.NullPointerException into the Exception Class Name field in the Breakpoint Properties dialog.  

If I write an application, I would want to catch any unhandled exceptions.  Whilst you can somewhat do this with NetBeans, coming from a M$ backgroud, the debugger in Visual Studio gives a bit more flexability.

I can enter * into the Exception Class Name field which will break on all errors.  This will throw exceptions in my application as well as the java base class library, typically ClassLoader and URLClassLoader, which I am not really interested in, but I would be interested to catch any exception which occurs in my application in any of my classes that I have written.

ClassLoader and URLClassLoader can throw a lot of exceptions, depending upon the code I have writter, which can make hitting the continue button too repetitive.

Also in Visual Studio (Express editions and Professional) 2005/2008, it gives you a popup window that contains the exception type and a bit more information as to the exception detail.  Could we do this with NetBeans also?
Comment 1 markiewb 2012-10-16 13:31:19 UTC
a) It is possible to break on every exception. Use 'java.lang.Exception' as class name.
b) It is possible to exclude ClassLoader and URLClassLoader. See the excluded classes textfields.