Changes to exception handling and error reporting