Equinox Online Help - Language Reference - A to Z
ReportError |
|
---|---|
Applies to | |
Syntax | ReportError CodeExpression, MessageExpression, SeverityExpression |
Action | [Statement] Reports an error message to the screen. |
Scope | Usable anywhere. |
Notes | This statement generates an Equinox system error. The error code, error message and severity are supplied as arguments. Note that the error code should be an integer between zero and 999 and the severity should be an integer between one and eight. SeverityExpression, is compared with the value held in the SysErrorMode workarea. If the severity is high enough, an error dialog appears on screen (like the dialog that appears if an error occurs when you are compiling a method). You can use the software system settings dialog to set the value of the SysErrorMode workarea. CodeExpression has no meaning for Equinox and can serve to identify the location of the ReportError statement. This statement is useful for reporting unexpected errors that you detect by examining the SysError workarea. |
Category | Debugging |
See Also | Assert, Print, PrintDevice, ReportError, Stop |
Example | The following example detects if invoice records have become logically out-of-step and reports an error (which is only displayed at levels seven and eight). if InvoiceNo <> order.InvoiceNo thenReportError 24, "Invoice numbers different", 7end if The next example detects more severe errors and always reports them (at level one). if syserror thenReportError 450, "Database error " & SysError & " on " & CurrentTableName, 1end if |