cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@sun3.oulu.fi>
Subject Catching exceptions in binding
Date Sun, 22 Apr 2007 19:44:00 GMT
Hi,

suppose I have the following:

<fb:javascript id="someId" path="." direction="save">
   <fb:save-form>
      ....
      object.setValues(values);
   </fb:save-form>
</fb:javascript>

Suppose the 'object.setValues(values)' throws an exception for whatever 
reason. With flow I have something like:

     ....
     catch (exception)
     {
       form.lookupWidget("messages").addMessage(exception);
     }

It seems that when an exception is thrown by 'object.setValues(values)', an

org.apache.avalon.framework.CascadingRuntimeException: Error invoking 
JavaScript event handler

is thrown, instead of the actual exception that was in fact thrown by 
the 'object.setValues(values)'.

What would be the best possible way to avoid the 
CascadingRuntimeException and get the original exception with flow. I 
have tried an try { ... } catch block, but I would like to avoid this. 
(The alternative is of course to ensure that the values that go into the 
'object.setValues(values);' do not cause any exception.)

Thanks for your help,
Andre.


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


Mime
View raw message