Recent Changes - Search:

edit SideBar

ErrorHandling

Any error that prevents the accessor from doing its job should result in throwing an exception (using JavaScript's throw command). How these are handled is up to the host.

In the Ptolemy host, every accessor is endowed with an additional error output port. The host catches any exceptions thrown by the accessor, and if something is connected to the error port, then it sends the error message to that port. Otherwise, it throws an exception, which usually causes the swarmlet to stop running.

FIXME: Sadly, at this time, any exception thrown in a callback function is uncaught, and only results in a message being printed on the command line. We need a mechanism to intercept uncaught exceptions in a JVM, but the documented ways of doing this don't work in the current version of Java.

Edit - History - Print - Recent Changes - Search
Page last modified on May 22, 2015, at 01:48 PM