exception_handler_vogui
Exception handler for a VO GUI application
The following code shows the exception message in a VO GUI messagebox. You should combine every exception handler with a logging functionality - a messagebox is gone too easily.
static class ExceptionHandler
static method ProcessException( oException as Exception ) as void
local cMessage as string
local oParent as object
local oBox as TextBox
cMessage := oException:Message
// log to disk here
do while oException:InnerException != NULL_OBJECT
// log to disk here
cMessage += CRLF + oException:Message
enddo
oParent := GetObjectByHandle( GetActiveWindow() )
if oParent == null_object
oParent := nil
endif
oBox := TextBox{ oParent, "Error", cMessage }
oBox:Type := BOXICONHAND
oBox:Beep := true
oBox:Show()
return
exception_handler_vogui.txt · Last modified: 2018/03/25 17:57 by wolfgangriedmann