User Tools

Site Tools


exception_handler_winforms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

exception_handler_winforms [2018/03/25 18:05]
wolfgangriedmann created
exception_handler_winforms [2018/03/25 18:07] (current)
wolfgangriedmann
Line 4: Line 4:
  
 <​code>​class wfExceptionEventHandler <​code>​class wfExceptionEventHandler
- +
 constructor( oSender as object, oArgs as ThreadExceptionEventArgs ) constructor( oSender as object, oArgs as ThreadExceptionEventArgs )
 local oException as Exception local oException as Exception
 local nResult as DialogResult local nResult as DialogResult
 local cMessage as string local cMessage as string
- +
 oException := oArgs:​Exception oException := oArgs:​Exception
 cMessage := "An error has been occurred:"​ + e"​\n\n"​ + oException:​Message + e"​\n\n"​ + ; cMessage := "An error has been occurred:"​ + e"​\n\n"​ + oException:​Message + e"​\n\n"​ + ;
-               ​oException:​StackTrace + e"​\n\n"​ + "​Continue execution?"​ +               ​oException:​StackTrace + e"​\n\n"​ + "​Continue execution?"​  
-  +nResult := MessageBox.Show( cMessage, "​Runtime error",​ MessageBoxButtons.YesNo)
-nResult := MessageBox.Show( cMessage, "​Runtime error",​ MessageBoxButtons.YesNo ) +
 if nResult == DialogResult.No if nResult == DialogResult.No
   Application.Exit()   Application.Exit()
 endif endif
-  + 
-return +return
  
 end class</​code>​ end class</​code>​
  
exception_handler_winforms.txt · Last modified: 2018/03/25 18:07 by wolfgangriedmann