Difference between revisions of "CERROR()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
Error Handling and Debugging
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to return the number of the last error encountered during a compile operation
 
Function to return the number of the last error encountered during a compile operation
Line 12: Line 8:
  
 
==See Also==
 
==See Also==
[[COMPILE]], [[DO]], [[ERROR()]], [[MESSAGE()]], [[SET COMPILE]], [[SET DEVELOPMENT]], [[SET PROCEDURE]]
+
[[COMPILE]], [[DO]], [[ERROR()]], [[MENU FORMAT]], [[MESSAGE()]], [[SET COMPILE]], [[SET DEVELOPMENT]], [[SET PROCEDURE]]
  
  
Line 22: Line 18:
 
<code lang="recital">
 
<code lang="recital">
 
procedure comp_err
 
procedure comp_err
on error
+
  on error
if cerror() > 0
+
  if cerror() > 0
    dialog box "Compile Error#" +;
+
      dialog box "Compile Error#" +;
    str(cerror() ,4)
+
      str(cerror() ,4)
endif
+
  endif
 
return
 
return
  
Line 35: Line 31:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Error Handling and Debugging]]
 +
[[Category:Error Handling and Debugging Functions]]

Latest revision as of 16:04, 27 November 2009

Purpose

Function to return the number of the last error encountered during a compile operation


Syntax

CERROR()


See Also

COMPILE, DO, ERROR(), MENU FORMAT, MESSAGE(), SET COMPILE, SET DEVELOPMENT, SET PROCEDURE


Description

The CERROR() function returns the number of the last error message encountered during a compile operation. If no compiler errors are found, the CERROR() function returns a zero. The COMPILE command is used to compile program files; however other commands may also cause a program file to be compiled. These commands include: DO, SET PROCEDURE and MENU FORMAT.


Example

procedure comp_err
  on error
  if cerror() > 0
      dialog box "Compile Error#" +;
      str(cerror() ,4)
  endif
return
 
on error do com_err
compile proclib.prg


Products

Recital Server, Recital