mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
added logging of unhandled exceptions in DEBUG build.
This commit is contained in:
parent
63bb1995ef
commit
a9375e777e
@ -67,6 +67,12 @@ namespace GARbro.GUI
|
|||||||
Trace.AutoFlush = true;
|
Trace.AutoFlush = true;
|
||||||
#endif
|
#endif
|
||||||
Trace.WriteLine ("ApplicationStartup --------------------------------", "GARbro.GUI.App");
|
Trace.WriteLine ("ApplicationStartup --------------------------------", "GARbro.GUI.App");
|
||||||
|
this.DispatcherUnhandledException += (s, args) =>
|
||||||
|
{
|
||||||
|
Trace.WriteLine (string.Format ("Unhandled exception caught: {1}", args.Exception.Message),
|
||||||
|
"GARbro.GUI.App");
|
||||||
|
Trace.WriteLine (args.Exception.StackTrace, "Stack trace");
|
||||||
|
};
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (0 != e.Args.Length)
|
if (0 != e.Args.Length)
|
||||||
@ -85,7 +91,7 @@ namespace GARbro.GUI
|
|||||||
if (string.IsNullOrEmpty (InitPath))
|
if (string.IsNullOrEmpty (InitPath))
|
||||||
InitPath = Directory.GetCurrentDirectory();
|
InitPath = Directory.GetCurrentDirectory();
|
||||||
|
|
||||||
CurrentPath = "";
|
CurrentPath = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationExit (object sender, ExitEventArgs e)
|
void ApplicationExit (object sender, ExitEventArgs e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user