Exceptions

The standard library provides the type core.Exception, which is the root class for all exceptions in Storm. Each exception contains a message, and optionally also a stack trace. It has the following members:

The saveTrace function returns the exception itself. This makes it convenient to add a stack trace to an exception temporarily by modifying code like:

throw MyException();

into:

throw MyException().saveTrace();

Exception Categories

The following exceptions are provided in the standard library: