Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
PROCEDURE USUAL
PARAMETERS MLINENO,MPROG
PRIVATE MPROG,MLINENO,MSGLINE
MSGLINE = "Sorry! An Error Has Occurred: "+CHR(13)+CHR(10)
MSGLINE = MSGLINE + "Error No.: "+ALLTRIM(STR(ERROR()))+CHR(13)+CHR(10)
MSGLINE = MSGLINE + "Nature: "+MESSAGE()+CHR(13)+CHR(10)
MSGLINE = MSGLINE + "Details:"+MESSAGE(1)+CHR(13)+CHR(10)
IF PARAMETERS() >1
MSGLINE = MSGLINE + "Procedure:"+MPROG+CHR(13)+CHR(10)
ENDIF
IF PARAMETERS() >0
MSGLINE = MSGLINE + "Line No.:"+ALLTRIM(STR(MLINENO))+CHR(13)+CHR(10)
ENDIF
MSGLINE = MSGLINE + CHR(13)+CHR(10)
MESSAGEBOX(MSGLINE,48,"Error")
ON SHUTDOWN
CANCEL
RETURN
ON ERROR DO ErrorHandler WITH ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO(1)
********************
PROCEDURE ErrorHandler
********************
PARAMETER tnError, tcMessage, tcMessage1, tcProgram, tnLineno
LOCAL lcErrorMessage
lcErrorMessage = "Error number: " + TRANSFORM(tnError) + CHR(13) ;
+ "Error message: " + tcMessage + CHR(13) ;
+ "Line of code: " + tcMessage1 + CHR(13);
+ "Program: " + tcProgram + CHR(13);
+ "Line number: " + TRANSFORM(tnLineno)
MESSAGEBOX(lcErrorMessage, 16, "A Problem Has Been Encountered")
CLEAR EVENTS
ENDPROC
On Error Do errorhandling
o = CreateObject("myForm")
o.Show(2)
Read Events
MessageBox("now I finished")
Procedure errorhandling()
MessageBox("an error occurred")
* Cancel
Clear Events
EndProc
Define Class myform as Form
Add Object cmdError as Commandbutton
Procedure cmdError.Click()
MessageBox("I will now error")
Use dfhjksdjfkhddfsdf && causes file not found error.
MessageBox("I still continue")
EndProc
EndDefine