locked
MMC snap-in exception handling RRS feed

  • Question

  • I have developed an MMC 3.0 Snap in. I want to handle all unhandled exceptions in my snap-in. I tried to use global exception handlers like Application.ThreadException and AppDomain.CurrentDomain.UnhandledException, but they do not work.

    My objective is to call a global exception handler which will be called when any unhandled exception occurs in the snap-in.

    Do anybody have any idea about how to achieve it?

    Thanks in advance,

    Amit


    Amit Kardile
    Tuesday, January 18, 2011 7:40 AM

Answers

All replies

  • Hi Amit,

     

    You may find this website helpful, which is a good exception handling framework:

     

    http://logging.apache.org/log4net/

     

    Also, here is a forum discussion on global exception handling, though in this case it is for a web application:

     

    http://stackoverflow.com/questions/3447766/catch-all-exception-handler-in-global-cs

     

    Is this what you were looking for?

     

    All the best,

     

    Roger

    • Marked as answer by eryang Tuesday, January 25, 2011 9:26 AM
    Tuesday, January 18, 2011 5:19 PM
  • Hi Roger,

    Thanks for the reply!

    I wish to avoid using third party frameworks and the other forum is about web applications.

    I wanted to know whether there is a way to catch unhandled exceptions in MMC snap-ins?

     

    Thanks in advance,

    Amit

     


    Amit Kardile
    Friday, January 28, 2011 9:28 AM