Exception Handling

Includes functions for exception handling.