G
giddy
hi,
I made this little crash reporter system for my project. It works by
getting hooked up to the Application.ThreadException event. If an
unhandled exception occurs , it logs it and then puts it on my ftp
account.
I tested it out and it works perfectly , I test it by Add : "throw new
Exception("Test");"
But if i add this "test" exception into the constructor *of a class
that my main form uses* , i don't end up catching the un-handled
exception!
I also don't end up catching exceptions thrown by my business classes
which are in a seperate Assembly (HotelManager.Core.dll). (The UI
assembly references this assembly)
Why is there such a Uncertainness to this Event?
static void Main()
{
Application.EnableVisualStyles();
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
ExceptionLogger ex = new ExceptionLogger();
Application.ThreadException += new
ThreadExceptionEventHandler(ex.UnhandledExceptionEventHandler);
Application.Run(new FrmMain());
}
Thanks
Gideon
I made this little crash reporter system for my project. It works by
getting hooked up to the Application.ThreadException event. If an
unhandled exception occurs , it logs it and then puts it on my ftp
account.
I tested it out and it works perfectly , I test it by Add : "throw new
Exception("Test");"
But if i add this "test" exception into the constructor *of a class
that my main form uses* , i don't end up catching the un-handled
exception!
I also don't end up catching exceptions thrown by my business classes
which are in a seperate Assembly (HotelManager.Core.dll). (The UI
assembly references this assembly)
Why is there such a Uncertainness to this Event?
static void Main()
{
Application.EnableVisualStyles();
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
ExceptionLogger ex = new ExceptionLogger();
Application.ThreadException += new
ThreadExceptionEventHandler(ex.UnhandledExceptionEventHandler);
Application.Run(new FrmMain());
}
Thanks
Gideon