Ensure emitted errors after an uncaught exception doesn't throw