[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions not being handled (or thrown correctly)



On Tue, Dec 07, 1999 at 04:08:13PM -0500, Ted Eiles wrote:
> 
> I'm trying to catch an exception that I throw.  It appears that the exception is created but my/maybe not thrown.
> 
> I looked through the documentation and couldn't find anything on exception handling. 
> 
> bsh.TargetError: TargetError : throw new javax .naming .NamingException ( appName + " not found" ) ; 
> Target exception: javax.naming.NamingException: biz not found
> 	at bsh.BSHThrowStatement.eval(BSHThrowStatement.java:31)
> 	at bsh.BSHBlock.eval(BSHBlock.java:29)
> 	at bsh.BSHIfStatement.eval(BSHIfStatement.java:28)

Hmm.  It looks like your exception was thrown but it wasn't caught...
It's appearing as a TargetError (the internal wrapper for an exception).

Can you send the snippet including the try/catch?
Does this happen if you try a simple example as well?


Pat