SAVE ERROR

From Recital Documentation Wiki
Revision as of 13:08, 16 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SAVE ERROR

Class

Error Handling and Debugging


Purpose

Save error.mem information to a specified file when an error occurs


Syntax

SAVE ERROR TO <mem filename>


See Also

ON ERROR, SET ERRORVERSION, ERRNO(), ERROR(), MESSAGE(), PROCLINE(), PROCNAME()


Description

The SAVE ERROR command saves the error.mem information to a specified file <mem filename> when an error occurs. This includes the following information:

  • Recital Software version, patch release and compilation date
  • Date and time file created
  • Machine and user names
  • Stack trace
  • Active public and private procedures and functions
  • Public and private memory variables
  • Active status of workareas
  • Settings as per DISPLAY STATUS

The SAVE ERROR command should be used in conjunction with the ON ERROR command. NOTE: multiple numbered error.mem files can be created automatically if SET ERRORVERSION is ON.


Example

procedure errproc
on error
lerrflag = .T.
save error to errlog
return
 
// Attempt to open non-existent table
lerrflag = .F.
on error do errproc
use nontable
if not lerrflag
// Continue processing
else
dialog box "Error has occurred"
endif


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer