Unhandled Exceptions outside of VS
- From: Bryce Covert <BryceCovert@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 5 Jul 2005 09:05:03 -0700
Some of us on the .net framework were working on an issue that I've
encountered. It seems that in this code, the catch will not catch the
exception outside of Visual Studio. If run straight from the exe, it'll
generate an unhandled exception.
With some more testing, I've noticed this also happens with Application.Run.
Any Ideas?
Thanks!
using System;
using System.Windows.Forms;
public class Test : Form
{
public Test()
{
Load += new EventHandler(LoadEventHandler);
}
private void LoadEventHandler(object sender, EventArgs args)
{
throw new Exception("Hello");
}
static void Main()
{
try
{
new Test().ShowDialog();
}
catch (Exception e)
{
Console.WriteLine ("Caught "+e);
}
}
}
.
- Follow-Ups:
- Re: Unhandled Exceptions outside of VS
- From: José Manuel Agüero
- Re: Unhandled Exceptions outside of VS
- Prev by Date: Skin in XP vrs w2K issue with transparency..
- Next by Date: "Specified cast is not valid" exception in Updater Application Blo
- Previous by thread: Skin in XP vrs w2K issue with transparency..
- Next by thread: Re: Unhandled Exceptions outside of VS
- Index(es):
Relevant Pages
|