If I recall correctly...
The event may have been triggered by another thread. In the 1.1 framework,
such exceptions would be lost if you don't have an UnhandledExceptionHandler
installed. In the 2.0 framework, unhandled exceptions kill the process.
Check the stack trace to figure out exactly what code triggered the event.
In this case, I suspect it is buried deep in the OS.
In general, you should throw exceptions from event handlers. It is very hard
to determine who is triggering the event just by looking at the code, so you
have no way to determine if they are going to handle it correctly.
--
Jonathan Allen
"Sagaert Johan" <RE*************@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP15.phx.gbl...
can someone explain :: (vs 2003)
allowdrop=true , the code is hit , but the thrown exception is never
catched ?
Why is this so?
private void button1_DragOver(object sender,
System.Windows.Forms.DragEventArgs e)
{
throw new Exception("nobody seems to catch this");
}
Johan