J
james
I have a console app with the code:
public static void Main(String[] args)
{
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(
delegate(object sender, UnhandledExceptionEventArgs e)
{
using (ErrorReportProxy proxy = new ErrorReportProxy())
{
proxy.Log(e.ExceptionObject as Exception);
}
Environment.Exit(-1);
});
throw new Exception("Kaboom!");
}
public class ErrorReportProxy : ClientBase<IErrorReport>
{
public void Log(Exception e)
{
Channel.Log(e);
}
}
When stepping through the code I see the exception get thrown and my
delegate get invoked, but when Channel.Log is called in the proxy the
debugger jumps back to the the "Kaboom!" exception (is it rethrown?).
This puts the app in a loop ... If I run the app outside of VS.net it
freezes until Windows shuts it down. Any ideas? Really weird behavior
I thought I understood this platform until today :/
Also there is no problem if I do something like
new ErrorReportProxy().Log(new Exception("Works Fine"));
Thanks,
James
public static void Main(String[] args)
{
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(
delegate(object sender, UnhandledExceptionEventArgs e)
{
using (ErrorReportProxy proxy = new ErrorReportProxy())
{
proxy.Log(e.ExceptionObject as Exception);
}
Environment.Exit(-1);
});
throw new Exception("Kaboom!");
}
public class ErrorReportProxy : ClientBase<IErrorReport>
{
public void Log(Exception e)
{
Channel.Log(e);
}
}
When stepping through the code I see the exception get thrown and my
delegate get invoked, but when Channel.Log is called in the proxy the
debugger jumps back to the the "Kaboom!" exception (is it rethrown?).
This puts the app in a loop ... If I run the app outside of VS.net it
freezes until Windows shuts it down. Any ideas? Really weird behavior
I thought I understood this platform until today :/
Also there is no problem if I do something like
new ErrorReportProxy().Log(new Exception("Works Fine"));
Thanks,
James