Difference between revisions of "SAVE ERROR"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Save error.mem information to a specified file when an error occurs
+
Save error information to a specified file when an error occurs
 
+
  
 
==Syntax==
 
==Syntax==
 
SAVE ERROR TO <mem filename>
 
SAVE ERROR TO <mem filename>
 
  
 
==See Also==
 
==See Also==
[[ERRNO()]], [[ERROR()]], [[MESSAGE()]], [[ON ERROR]], [[PROCLINE()]], [[PROCNAME()]], [[SET ERRORVERSION]]
+
[[ERRNO()]], [[ERROR()]], [[MESSAGE()]], [[ON ERROR]], [[PROCLINE()]], [[PROCNAME()]]
 
+
  
 
==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 error information to a specified file <mem filename> when an error occurs.  This includes the following information:
 
+
  
* Recital Software version, patch release and compilation date
+
* Version, patch release and compilation date
 
* Date and time file created
 
* Date and time file created
 
* Machine and user names
 
* Machine and user names
Line 24: Line 20:
 
* Settings as per DISPLAY STATUS
 
* Settings as per DISPLAY STATUS
  
 
+
The SAVE ERROR command should be used in conjunction with the ON ERROR command.
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==
 
==Example==
Line 43: Line 37:
 
     // Continue processing
 
     // Continue processing
 
else
 
else
     dialog box "Error has occurred"
+
     messagebox("Error has occurred")
 
endif
 
endif
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Error Handling and Debugging]]
+
[[Category:Error Handling]]
[[Category:Error Handling and Debugging Commands]]
+

Revision as of 07:51, 18 January 2013

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 workareas
  • 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
return
 
// Attempt to open non-existent table
lerrflag = .F.
on error do errproc
use nontable
if not lerrflag
    // Continue processing
else
    messagebox("Error has occurred")
endif