Better UncaughtErrorEvent handling