Assembly Load Exception Problem?

  • Thread starter Thread starter Adam Right
  • Start date Start date
A

Adam Right

Hi,

I use Assembly.LoadFrom to load my assembly which is the user interface dll
for my application. After loading, i invoke the entry method to run my
application.

But when the application throws an exception elsewhere, normally it has to
show it on the screen. It shows but the application cursor is located on the
InvokeMethod, so when the exception occurs it causes the application
restart. Why restart? beacuse i have invoked the entry method to run my
application firstly.

My question is that how can i catch the exception message and prevent
application to exit? Loading assembly dynamicly is wrong for that case?
Thanks...
 
I assume the entry methods loads a form and does things like that. Put a try
catch inside that method and handle the error in the UI dll.

HTH

Ciaran O'Donnell
 
Back
Top