You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Laurent Martelli <la...@bearteam.org> on 2002/09/09 02:54:27 UTC
Exception table
Hi there,
I can't seem to get any exception table from a org.apache.bcel.classfile.Method
getExceptionTable() always returns null, even when there is a
try-catch block in the method. Am I missing something ?
--
Laurent Martelli http://jac.aopsys.com/
laurent@bearteam.org http://www.bearteam.org/~laurent/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Exception table
Posted by Laurent Martelli <la...@bearteam.org>.
>>>>> "Anthony" == Anthony La Forge <e_...@hotmail.com> writes:
Anthony> The exception needs to be explictly called out by the
Anthony> method (e.g. public void myMethod *throws ExceptionXYZ
Anthony> {...}) otherwise the exception will not end up in the
Anthony> table. Even if you have a throw statement in your code or
Anthony> a try catch block, they will not appear unless the previous
Anthony> condition was met.
Anthony> Hope that helps.
It does, thanks. I thought that it represented exception
handlers. What I wanted was method.code().getExceptionTable().
--
Laurent Martelli http://jac.aopsys.com/
laurent@bearteam.org http://www.bearteam.org/~laurent/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Exception table
Posted by Anthony La Forge <e_...@hotmail.com>.
The exception needs to be explictly called out by the method (e.g. public
void myMethod *throws ExceptionXYZ {...}) otherwise the exception will not
end up in the table. Even if you have a throw statement in your code or a
try catch block, they will not appear unless the previous condition was met.
Hope that helps.
Cheers...
----- Original Message -----
From: "Laurent Martelli" <la...@bearteam.org>
To: <bc...@jakarta.apache.org>
Sent: Sunday, September 08, 2002 8:54 PM
Subject: Exception table
> Hi there,
>
> I can't seem to get any exception table from a
org.apache.bcel.classfile.Method
>
> getExceptionTable() always returns null, even when there is a
> try-catch block in the method. Am I missing something ?
>
> --
> Laurent Martelli http://jac.aopsys.com/
> laurent@bearteam.org http://www.bearteam.org/~laurent/
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>