IException.ReportError

Syntax

ReportError;

Description

The ReportError method displays an error report.

Comments

The message contains the error text, identifier of the unit/form and the number of the line, in which the error occurred, as well as information about the error, which caused the current exception.

Example

Sub UserProc;
Var
    a: Array[0..1Of Integer;
Begin
    Try
        a[2] := 1;
    Except On e: IndexOutOfRangeException Do
        e.ReportError;
    End Try;
End Sub UserProc;

After executing the example the error "Invalid element index!" will be generated. An appropriate error message is displayed on handling this error.

See also:

IException