private static void HandleUnhandledException(object sender, UnhandledExceptionEventArgs args) { Exception exceptionObject = args.ExceptionObject as Exception; if (exceptionObject != null) { UnhandledExceptionHandler.PrintException("Unhandled Exception: ", exceptionObject); } UnhandledExceptionHandler.NativeUnhandledExceptionHandler(); }
private static void HandleUnhandledException(object sender, UnhandledExceptionEventArgs args) { Exception ex = args.ExceptionObject as Exception; if (ex != null) { UnhandledExceptionHandler.PrintException("Unhandled Exception: ", ex); UnhandledExceptionHandler.NativeUnhandledExceptionHandler(ex.GetType().Name, ex.Message, ex.StackTrace); } else { UnhandledExceptionHandler.NativeUnhandledExceptionHandler(null, null, null); } }