14 lines
396 B
Plaintext
14 lines
396 B
Plaintext
;Set up a Procedure to handle any Error
|
|
Procedure MyErrorHandler()
|
|
Define txt$="The following error happened."+#CRLF$+ ErrorMessage()+"at line "+Str(ErrorLine())
|
|
MessageRequester("OnError test", txt$)
|
|
EndProcedure
|
|
|
|
; Tell where to go if an Error happens
|
|
OnErrorCall(@MyErrorHandler())
|
|
|
|
;Now, do something very stupid so that we may see an Error...
|
|
Repeat
|
|
A=Random(100)/Random(100)
|
|
ForEver
|