Bug 137310 - Catch all exceptions that can be thrown from JDI calls.
Catch all exceptions that can be thrown from JDI calls.
Status: VERIFIED FIXED
Product: debugger
Classification: Unclassified
Component: Java
6.x
All All
: P1 (vote)
: 6.x
Assigned To: Martin Entlicher
issues@debugger
: PLAN
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-16 14:02 UTC by Martin Entlicher
Modified: 2009-02-19 20:39 UTC (History)
0 users

See Also:
Issue Type: TASK
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2008-06-16 14:02:43 UTC
There is a very poor documentation of which exceptions are actually thrown from which JDI method.

We need to put try/catch block around every JDI call and catch the errors. It looks like the errors are better
documented in the description of JDWP protocol -
http://java.sun.com/javase/6/docs/platform/jpda/jdwp/jdwp-protocol.html. This can provide hints on which exceptions are
thrown from corresponding JDI methods.
Comment 1 Martin Entlicher 2008-12-10 16:50:12 UTC
Scheduling for 7.0.
The intended implementation of this is to generate wrappers for JDI methods and checked wrapper exceptions.
Every method should clearly specify what exception can be thrown from it and the code needs to catch these exceptions.

JDI methods should not be called directly, but only through the wrappers. This will prevent from unexpected exceptions.
Also, the wrappers can automatically catch pathological exceptions, like InternalErrors, which do occur, sometimes.
Comment 2 Martin Entlicher 2008-12-15 07:44:22 UTC
InternalExceptions can be handled more gracefully - see e.g. issue #54624.
Comment 3 Martin Entlicher 2008-12-20 08:17:07 UTC
Wrappers for JDI methods are generated, they throw checked exceptions that must be caught in the code. All class to JDI
are rewritten to use the wrapper methods in debugger.jpda module:

http://hg.netbeans.org/main/rev/ce0f62c27784
http://hg.netbeans.org/main/rev/3390b1db7b95
http://hg.netbeans.org/main/rev/da5914cb240b
http://hg.netbeans.org/main/rev/6380978bfeff
Comment 4 Quality Engineering 2008-12-23 17:09:41 UTC
Integrated into 'main-golden', will be available in build *200812231401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ce0f62c27784
User: mentlicher@netbeans.org
Log: #137310 - Added class generating wrappers of all JDI methods. These wrappers should catch exceptions thrown from JDI calls.
Comment 5 Filip Zamboj 2009-02-16 13:26:45 UTC
this issue has been verified recently. Appears as fixed. 

 


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo