[Mono-list] Isolating exceptions between AppDomains

Chris Howie cdhowie at gmail.com
Thu Oct 23 12:28:01 EDT 2008

On Thu, Oct 23, 2008 at 11:27 AM, paszczi <paszczi at go2.pl> wrote:
>> On Wed, Oct 22, 2008 at 1:41 PM, paszczi  wrote:
>> > I'm trying to build some software that uses plugins. The basic requirements is that when one plugins crashes (throws some exception), the whole system should recover from the error. So my first approach was to create AppDomain for each plugin and let it run there. However when plugins throws exception it goes back to default AppDomain and, as a result, crashes whole application. Is there any way to workaround this?
>> Use a try block.
> OK, maybe I didn't clarify. Each plugins starts its own processing thread. So when the child thread throws exception there is no way to catch it in try-catch

Sure there is.  Catch in the thread and come up with a mechanism to
pass it back to the main thread.

Chris Howie

More information about the Mono-list mailing list