cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From footh <fo...@yahoo.com>
Subject Re: Strange error with try-catch in finally clause.
Date Tue, 09 Aug 2005 23:16:37 GMT
Yea, I believe that would bomb.  I'm using javaflow,
which is a Java class with methods that are called
from the sitemap.  It wouldn't even compile if I tried
that.

I believe the framework has a problem with a java flow
having a try-catch within a finally clause.

--- Ralph Goers <Ralph.Goers@dslextreme.com> wrote:

> How can that work?  It isn't valid Java.
> 
> Ralph
> 
> Nick Goupinets wrote:
> 
> > Hi footh,
> >
> > You need to use JavaScript style of exception
> handling in the flow, 
> > unless you are using Java interpreter
> >
> > Try this:
> >
> > if (conn != null)
> >   try { conn.close(); } catch (e) { print(e) }
> >
> > footh wrote:
> >
> >> In a javaflow, I open a db connection.  Then in a
> >> finally clause, I have this code:
> >>
> >> if (conn != null)
> >>   try { conn.close(); } catch (Exception e) { }
> >>
> >> This causes this error when I try to access any
> page:
> >>
> >> Instruction ' 223: ret[169](2) 8' is part of more
> than
> >> one subroutine (or of the top level and a
> subroutine).
> >>
> >> I tested to see if it was only a problem with the
> conn
> >> object by putting this line in the clause:
> >>
> >> try  { System.out.println("Hi!"); } catch
> (Exception
> >> e) { }
> >>
> >> Sure enough, I get the same error.  The function
> in
> >> question is never called either, so I assume it
> has to
> >> do with the javaflow interpreter.  I guess there
> is no
> >> way to put a try-catch within a finally clause?
> >>
> >>
> >>
> __________________________________________________
> >> Do You Yahoo!?
> >> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >> http://mail.yahoo.com
> >>
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> >> For additional commands, e-mail:
> users-help@cocoon.apache.org
> >>
> >>
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> users-help@cocoon.apache.org
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message