Using the variable-binding form of the try...handle block allows any PLAN exception to be caught. Therefore a simple error-reporting system may be set up. For example:
fun exnreport(h:host,e:exn):unit = print("I raised ",e," on ",h) fun main(...) = try ... handle e => OnRemote(exnreport(thisHost(),e),home,getRB(),defaultRoute)
Note that service calls and language constructs may raise exceptions which can be caught with try...handle blocks. As with uncaught exceptions raiseed by the PLAN program, these exceptions will cause the termination of the program and the deletion of the packet. The language-level exceptions are: