41 public static event EventHandler<ManageExceptionEventArgs> ManageExceptionCallback;
45 #region Static methods 56 public static bool Manage(
object origin, Exception e)
59 if (ManageExceptionCallback != null)
61 ManageExceptionCallback(origin, args);
63 return args.IsHandled;
72 "AppDomain_UnhandledException dump" + Environment.NewLine +
73 DateTime.Now.ToString(
"s",
System.Globalization.CultureInfo.InvariantCulture) + Environment.NewLine +
74 "============================================================" + Environment.NewLine;
77 dump += e.ExceptionObject.ToString();
78 System.IO.File.WriteAllText(DumpFile, dump);
85 #region Static properties 91 public static string DumpFile
95 if (String.IsNullOrEmpty(_dumpFile))
97 _dumpFile =
System.IO.Path.Combine(
98 System.IO.Path.GetTempPath(),
113 private static string _dumpFile;
static bool Manage(object origin, Exception e)
Central exception managing method; can be called in try...catch statements of user entry points...
This static class implements central exception management.
static void AppDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
Event handler for the AddDomain.CurrentDomain.UnhandledException event.