public void SetUnhandledExceptionHandler() { AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler; }