G
Guest
A client of mine is getting a NullReferenceException when starting up a small
app I've written. I've traced the cause to an unregistered DLL the app
references, so the error itself is not the problem. What I would like to do
is trap it, but I'm not sure where I should do this. Here's an excerpt from
the exception text:
System.NullReferenceException: Object reference not set to an instance of an
object.
at HDi.Form1.Form1_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
[snip]
So my question is: where can I trap this error? Is there a way to test for
the presence of a DLL (and to check it's registered) before the start-up form
is created and this error is generated? Any help would be greatly appreciated.
app I've written. I've traced the cause to an unregistered DLL the app
references, so the error itself is not the problem. What I would like to do
is trap it, but I'm not sure where I should do this. Here's an excerpt from
the exception text:
System.NullReferenceException: Object reference not set to an instance of an
object.
at HDi.Form1.Form1_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
[snip]
So my question is: where can I trap this error? Is there a way to test for
the presence of a DLL (and to check it's registered) before the start-up form
is created and this error is generated? Any help would be greatly appreciated.