Difference between revisions of "SAVE ERROR"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 17: | Line 17: | ||
* Active public and private procedures and functions | * Active public and private procedures and functions | ||
* Public and private memory variables | * Public and private memory variables | ||
− | * Active status of | + | * Active status of cursors |
* Settings as per DISPLAY STATUS | * Settings as per DISPLAY STATUS | ||
Line 28: | Line 28: | ||
lerrflag = .T. | lerrflag = .T. | ||
save error to errlog | save error to errlog | ||
− | + | endproc | |
// Attempt to open non-existent table | // Attempt to open non-existent table | ||
Line 37: | Line 37: | ||
// Continue processing | // Continue processing | ||
else | else | ||
− | messagebox("Error has occurred") | + | messagebox("Error has occurred. See errlog.mem for details.") |
endif | endif | ||
</code> | </code> |
Latest revision as of 08:46, 18 January 2013
Contents
Purpose
Save error information to a specified file when an error occurs
Syntax
SAVE ERROR TO <mem filename>
See Also
ERRNO(), ERROR(), MESSAGE(), ON ERROR, PROCLINE(), PROCNAME()
Description
The SAVE ERROR command saves error information to a specified file <mem filename> when an error occurs. This includes the following information:
- 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 cursors
- Settings as per DISPLAY STATUS
The SAVE ERROR command should be used in conjunction with the ON ERROR command.
Example
procedure errproc on error lerrflag = .T. save error to errlog endproc // Attempt to open non-existent table lerrflag = .F. on error do errproc use nontable if not lerrflag // Continue processing else messagebox("Error has occurred. See errlog.mem for details.") endif