Processing of unprocessed exceptions


  • QA Engineer

    During the work of my annex Net Windows Formsin the event of unprocessed exceptions, there is a window with the text of the exclusion message, the contents StackTrace and buttons Continue. and Exit Окно, появляющееся при возникновении необработанного исключения

    (1) Could a project be designed to make something else happen when unprocessed exceptions arise?

    (2) Can a processor be placed on this window to record unprocessed exceptions?

    If the user presses Exitthe annex shall be interrupted immediately and not even the closing date of the main window of the annex.

    (3) Can the processor put the event on the button? Exit ?



  • You need some things. https://msdn.microsoft.com/ru-ru/library/system.appdomain.unhandledexception(v=vs.110).aspx and https://msdn.microsoft.com/ru-ru/library/system.windows.forms.application.threadexception(v=vs.110).aspx ♪ It might also be useful to try...catch in Main Method.

    These three ways allow for the interception of exemptions before they reach standard processors (i.e. the window you have shown will not be available). If you have to report a mistake to the user, you'll have to do it on your own.

    You can't intercept the "Exit" button without mega-codes.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2