next up previous contents
Next: Automatic Code Generation Up: Overflow User's Manual Previous: Using nodes   Contents

Subsections

Exceptions

Run-time Exceptions

First, it is important to note that there are two types of exceptions that can happen. The first type, which we'll call run-time exceptions, is thrown (usually by a node) when an error happens during processing by Overflow. Such type of exception can be thrown when a node receives an object of an unexpected type, but there can be many other causes. Run-time exceptions usually terminate the current Overflow program with an error message indicating where the error happened. They are analogous to run-time errors in most interpreted languages.

It is possible to prevent a run-time exception from stopping a program. This can be done with the Recover node, that catches all run-time exceptions.

User Exceptions

The second type of exceptions, user exceptions, can be thrown and caught by a user program using the Throw and Catch nodes. They are serve the same function as the throw and catch statements in a C++ program.


next up previous contents
Next: Automatic Code Generation Up: Overflow User's Manual Previous: Using nodes   Contents
Jean-Marc Valin 2002-06-17