SORTIE-ND
Software for spatially-explicit simulation of forest dynamics

Java Exception Handling

Java exception handling is based on the class ModelException. This class is basically a clone of the C++ exception structure modelErr. Caught errors are displayed to the user using the ErrorGUI class.

The ErrorGUI class looks at the type of error being passed and tries to display a helpful context along with the actual error message. However, if the calling function is set to "JAVA", the class will display the error message with no other adornments. This makes it a handy way to display errors from the Java code.