By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Assembly Load Exception Problem?

P: n/a
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...
Sep 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"Adam Right" wrote:
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...
Sep 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.