Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 137310 - Catch all exceptions that can be thrown from JDI calls.
Catch all exceptions that can be thrown from JDI calls.
Product: debugger
Classification: Unclassified
Component: Java
All All
: P1 (vote)
: 6.x
Assigned To: Martin Entlicher
Depends on:
  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


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 - 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:
Comment 4 Quality Engineering 2008-12-23 17:09:41 UTC
Integrated into 'main-golden', will be available in build *200812231401* on (upload may still be in progress)
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. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo