Difference between revisions of "ERROR"
Helengeorge (Talk | contribs) (→Class) |
Helengeorge (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Create a user defined error message | Create a user defined error message | ||
Line 35: | Line 33: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 17:17, 10 November 2009
Purpose
Create a user defined error message
Syntax
ERROR <expN>, <expC>
See Also
DB_ERRORDIR, ERROR(), MESSAGE(), ON(), ON ERROR, SAVE ERROR, SET ERRORVERSION
Description
The ERROR command is used to define and signal a user-defined error. When the ERROR command is executed, a run-time error occurs and if no ON ERROR procedure is present, an error.mem file will be generated. If an ON ERROR procedure is present the error procedure will be called. The ERROR() function returns the number of the last error encountered. The MESSAGE() function returns the message of the last error encountered. The ON ERROR command may be used to execute specified commands when an error occurs.
<expN>
The numeric expression <expN> is the user defined error number.
<expC>
The character expression <expC> is the error message to be associated with the error number.
Example
mfile = "customer" //... if mfile <> "customer" error 6000, "Wrong file" endif
Products
Recital Server, Recital