This discussion is archived
0 Replies Latest reply: Jun 29, 2009 6:31 PM by 843810 RSS

exceptions thrown by a method

843810 Newbie
Currently Being Moderated
Hi,

In JDI is there a way to get the list of exceptions that can be thrown by a method? I want to find out when a method exits but MethodExitEvent is not generated when a method quits by throwing an exception, so in addition to MethodExitRequest I am also inserting breakpoints in exceptions that can be thrown by the method. But while there is a java.lang.reflect.Method.getExceptionTypes(), I wasn't able to find a corresponding call in com.sun.jdi.Method. Is there some way of achieving the same thing?

Thanks, Alvin