* ErrHand.prg LPARAMETERS merror, mess, mess1, mprog, mlineno CLEAR =MessageBox('Error number: ' + LTRIM(STR(merror)) + chr(13) +; 'Error message: ' + mess + chr(13) +; 'Line of code with error:' + repl(chr(13),2) + [> ] + mess1 + repl(chr(13),2) +; 'Line number of error: ' + ALLTRIM(STR(mlineno)) + chr(13) +; 'Program with error: ' + mprog, 48, "Error Message Found!!")of cos, you can add do case to handle some special error number or
* Done by someone here! ^_^; * FullName.prg 13-Jun-95 * Generate an object's full containership name * 03-Dec-95 added additional validity testing * 26-Apr-96 added testing to handle _VFP object which is its own .Parent function FullName( roObject ) *!* =NVL(.null., _screen) *!* messagebox(_screen.name + chr(9) + _screen.class+ chr(9) + str(_screen.formcount)) if ( ( type( "roObject" ) == 'O' ) and ! isnull( m.roObject ) ) if ( ( type( "roObject.Parent" ) == 'O' ) and ; ( roObject.Name != "Microsoft Visual FoxPro" ) ) return ( FullName( roObject.Parent ) + "." + roObject.Name ) else return roObject.Name endif else return "" endifThen, the object.error will be: