[kepler-users] Error handling

Chad Berkley berkley at nceas.ucsb.edu
Wed Dec 9 10:02:42 PST 2009


Hi Barbara,

The difference between the two is that the ThrowException actor causes a 
Java exception (IllegalActionException) to be thrown immediately, which 
can be caught in the code of its immediate container.  The 
ThrowModelError actor will pass its exception up the containment 
hierarchy until one of the containers has registered a 
ModelErrorHandler.  See the API docs for NamedObject 
(http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/codeDoc/index.html) 
for more information on those methods.

I also found a thread here: 
http://www.nnseek.com/e/comp.softsys.ptolemy/how_to_handle_exceptions_in_fire_54361750m.html
where Christopher talks about handling exceptions in models and actors.

Let us know if you need more information.

chad


Barbara Lerner wrote:
> Hi,
> 
>   I am new to Kepler and I am trying to understand how exception 
> handling is done in Kepler.  I see two actors:  Throw Exception and 
> Throw Model Error.  From the documentation, it seems that using Throw 
> Model Error would allow one to catch the error elsewhere in the 
> workflow, but I don't see any discussion of how I would do that.  Can 
> someone explain this or point me to the documentation that does?
> 
> Thanks,
>   Barbara
> 
> ------------------
> 
> Barbara Lerner                                                  "Power 
> to the peaceful"
> Associate Professor                                                  -- 
> Michael Franti
> Computer Science Dept.
> Mt. Holyoke College
> 
> 
> 
> 
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users



More information about the Kepler-users mailing list