>ON ERROR DO ERRTRAP WITH ERROR(), PROGRAM(), LINENO() > >PUBLIC oform1 > >oform1=NEWOBJECT("form1") >oform1.Show > >RETURN > >PROCEDURE ERRTRAP (nErrorNo, cProgram, nLineNo) > >cMsg = "Error number : "+ALLTRIM(STR(nErrorNo))+CHR(13)+; > "Origin : "+cProgram+CHR(13)+; > "Description : "+MESSAGE()+CHR(13)+; > "Line number : "+ALLTRIM(STR(nLineNo)) > >Wait WINDOW cMsg > >RETURN > >DEFINE CLASS form1 AS form > > > DoCreate = .T. > Caption = "Form1" > Name = "Form1" > > ADD OBJECT command1 AS commandbutton WITH ; > Top = 204, ; > Left = 54, ; > Height = 27, ; > Width = 84, ; > Caption = "Command1", ; > Name = "Command1" > > PROCEDURE command1.Click > > a = b > ENDPROC > >ENDDEFINE >