Exceptions: Added patch created by Paul to change how exceptions are handled. Fixes #34276