Difference between revisions of "SAVE ERROR"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SAVE ERROR=
 
 
 
==Class==
 
Error Handling and Debugging
 
 
 
 
==Purpose==
 
==Purpose==
 
Save error.mem information to a specified file when an error occurs
 
Save error.mem information to a specified file when an error occurs
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[ON ERROR]], [[SET ERRORVERSION]], [[ERRNO()]], [[ERROR()]], [[MESSAGE()]], [[PROCLINE()]], [[PROCNAME()]]
+
[[ERRNO()]], [[ERROR()]], [[MESSAGE()]], [[ON ERROR]], [[PROCLINE()]], [[PROCNAME()]], [[SET ERRORVERSION]]
  
  
 
==Description==
 
==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:
 
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
 
* Recital Software version, patch release and compilation date
Line 29: Line 23:
 
* Active status of workareas
 
* Active status of workareas
 
* Settings as per DISPLAY STATUS
 
* 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.
 
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.
Line 36: Line 31:
 
<code lang="recital">
 
<code lang="recital">
 
procedure errproc
 
procedure errproc
on error
+
  on error
lerrflag = .T.
+
  lerrflag = .T.
save error to errlog
+
  save error to errlog
 
return
 
return
  
Line 46: Line 41:
 
use nontable
 
use nontable
 
if not lerrflag
 
if not lerrflag
// Continue processing
+
    // Continue processing
 
else
 
else
dialog box "Error has occurred"
+
    dialog box "Error has occurred"
 
endif
 
endif
 
</code>
 
</code>
Line 54: Line 49:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Error Handling and Debugging]]
 +
[[Category:Error Handling and Debugging Commands]]

Latest revision as of 16:35, 12 November 2009

Purpose

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


Syntax

SAVE ERROR TO <mem filename>


See Also

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


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 Server, Recital