Exception handlers set no exit code

Fix exception handlers to set exit code.