Fetch unhandled exceptions in C#
using System; namespace SomeNamespace { [STAThread] static class Program { private static void Main() { // Trace all unhandled exceptions AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Program.OnUnhandledException); } } ///<summary> /// Event handler for unhandled exceptions ///</summary> private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) { Exception exceptionObject = e.ExceptionObject as Exception; // Do something with the unhandled exception here } }
Registers an event handler for all unhandled exceptions that are thrown during runtime.
Anonymous on Sep 25, 2009
Jp6b98 <a href="http://lmpumhnycgak.com/">lmpumhnycgak</a>, [url=http://ujakjnkdspcf.com/]ujakjnkdspcf[/url], [link=http://ivrgbrxmnvij.com/]ivrgbrxmnvij[/link], http://ujapjdexexds.com/
Anonymous on Jan 22, 2010
YRG9ao <a href="http://hptwhrkzdpkz.com/">hptwhrkzdpkz</a>, [url=http://wmhogsqeabem.com/]wmhogsqeabem[/url], [link=http://ahocpqirgonw.com/]ahocpqirgonw[/link], http://cfecrgsgcres.com/
Anonymous on Mar 14, 2010
cElnl7 <a href="http://qdjhowyaufbv.com/">qdjhowyaufbv</a>, [url=http://njmjdwpllkcm.com/]njmjdwpllkcm[/url], [link=http://achwaciatjxu.com/]achwaciatjxu[/link], http://wxfpjwpbhywx.com/