mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-10 01:46:24 +00:00
Additional diagnostic reporting
This commit is contained in:
parent
4949a35a84
commit
8deecc2808
1 changed files with 3 additions and 0 deletions
|
@ -20,12 +20,15 @@ namespace NBTExplorer
|
||||||
public static void StaticInitFailure (Exception e)
|
public static void StaticInitFailure (Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Static Initialization Failure:");
|
Console.WriteLine("Static Initialization Failure:");
|
||||||
|
|
||||||
|
Exception original = e;
|
||||||
while (e != null) {
|
while (e != null) {
|
||||||
Console.WriteLine(e.Message);
|
Console.WriteLine(e.Message);
|
||||||
Console.WriteLine(e.StackTrace);
|
Console.WriteLine(e.StackTrace);
|
||||||
e = e.InnerException;
|
e = e.InnerException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MessageBox.Show("Application failed during static initialization: " + original.Message);
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue