As per the documentation for EventRequestManager.createExceptionRequest()
it states that
"Caught exceptions, uncaught exceptions, or both can be selected.
boolean notifyCaught - If true, caught exceptions will be reported.
boolean notifyUncaught - If true, uncaught exceptions will be reported "
***The boolean notifyCaught and notifyUncaught values have been
tested in various combinations in createExceptionRequest()
The various combinations are
Case 1:
requestManager.createExceptionRequest(reference,false,false);
Case 2:
requestManager.createExceptionRequest(reference,true,true);
Case 3:
requestManager.createExceptionRequest(reference,true,false);
Case 4:
requestManager.createExceptionRequest(reference,false,true);
It is found that exception events are reported only with
requestManager.createExceptionRequest(reference,false,false)
and in the rest of the cases no exception event is reported.
It is expected that with false,false as argument no event should be reported
but it is found that events are reported.
When the boolean values are true it is expected that events be reported and
that does not happen.
Windows Testing done in (1.3-0-Z) build Hotspot and Classic.
Solaris Testing done in (1.3.0.Z) build Classic..
The output logfiles are attached for both the Windows and Solaris
Scenario 1:
--------------
Uncaught and caught Exceptions
Debugger:ExceptionRequestTest1.java
Debugee: ExampleException.java
Here all the 4 cases are tested and it as per the output
Exception events have been reported only for
Case 1
No event is reported in the other cases(case2, 3 and 4)
Scenario 2:
---------------
caught Exceptions -
Debugger:ExceptionRequestTest2.java
Debugee: ExceptionDebugee.java
This is with caught exceptions only . As above only for
Case1 exceptions have been reported, as for Case2 and
Case3 where events are expected, no event is reported
Scenario 3:
---------------
Uncaught Exceptions
Debugger:ExceptionRequestTest3.java
Debugee: ExceptionDebugee1.java
This is with UnCaught exceptions only . As above only for
Case1 exceptions have been reported, as for Case2 and
Case4 where events are expected ,no event is reported
*************************************************************************
Steps to reproduce the bug
-----------------------------------
The bug can be reproduced using the files in the location
/net/sqesvr/export/disk5/toolsbugs/4323439
Follow the instructions in README to reproduce the bug.
-----------------------------------------------------------------
The location was changed to /net/sqesvr/export/xlt/Tools/toolsbugs/4323439.
But to reproduce the bug go to /net/sqesvr/export/vsn/GammaBase/Bugs/4323439, set the variable BINDIR to the latest JDK in the files Makefile.solaris, Makefile.win32 then run appropriate scripts mentioned below.
This bug reports unexpected behaviour of EventRequests in three test cases.
The method com.sun.jdi.request.EventRequestManager.createExceptionRequest()
is called with three various combinations of boolean parameters notifyCaught and
notifyUncaught.
Here they are.
Test case 1:
------------
Create in the debugger an ExceptionRequest called
createExceptionRequest(reference,false,false)
i.e. do not report both caught and uncaught exceptions.
The debugee raises the exception which is reported by the debugger but should not.
Debugger: ExceptionRequestTest1.java
Debugee: ExampleException.java
To reproduce it start the target VM using run_debugee1.ksh
then in other window start the debugger using run_debugger1.ksh
Test case 2:
------------
Create in the debugger an ExceptionRequest called
createExceptionRequest(reference,true,false)
i.e. report only caught exceptions.
The debugee caught the NumberFormatException, but no event is reported
by the debugger.
Debugger: ExceptionRequestTest2.java
Debugee: ExceptionDebugee.java
To reproduce it start the target VM using run_debugee2.ksh
then in other window start the debugger using run_debugger2.ksh
Test case 3:
------------
Create an ExceptionRequest by call createExceptionRequest(reference,false,true)
i.e. report only uncaught exceptions.
The debugee raises uncaught exception and no event is reported by the debugger,
but actually the target VM doesn't resume their execution after connection
with the debugger as expected so I can not reproduce this test case.
Debugger: ExceptionRequestTest3.java
Debugee: ExceptionDebugee1.java
To try to reproduce it start the target VM using run_debugee3.ksh
then in other window start the debugger using run_debugger3.ksh
ip94532@Eng 2000-09-13