Hi all! I'm currently writing server that hosts several modules. Server runs each module in separate AppDomain. What I want to achieve is exception isolation. I mean when one module throws exception I don't want whole process to terminate, just this specific AppDomain. I know that I can tell CLR to fallback to old behaviour (.NET 1.0) when all uncought exception in different threads were swallowed. However, this is not the most 'elegant' solution.
+4
A:
How about subscribing to this event:
AppDomain.CurrentDomain.UnhandledException
You'll have to cast the ExceptionObject property from type Object to Exception.
Hope that helps.
hmemcpy
2008-10-23 07:41:11