Again Winforms Unhandled Exceptions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • comphead
    New Member
    • Aug 2007
    • 9

    Again Winforms Unhandled Exceptions

    Good day.
    I have code which must handle global exceptions.
    But it doesn't handle permission exception or exception when neccessary DLL no t found. Windows show message with little information and button "Send Report". And I need to know what error occured. What i did wrong?

    Code:
            [STAThread]
            static void Main()
            {
                AppDomain l_domain = AppDomain.CurrentDomain;
                l_domain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                
                Application.Run(new frmMain());
            }
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I don't think you CAN catch those exceptions. I've not seen any way to do it.

    Comment

    Working...