I\'m using the FirstChanceException event to log details about any thrown exceptions.
static void Main(string[] args)
{
AppDomain.CurrentDomain.FirstChanceEx
I think adding another try {} catch (){}
block in the exception handler would help
static void Main(string[] args)
{
AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
{
try {
throw new Exception("Stackoverflow");
} catch (Exception e)
{
// Do something very simple not throwing an exception...
}
};
throw new Exception("Exception thrown in main.");
}