System.ErrorProc
Delphi
ErrorProc: procedure (ErrorCode: Byte; ErrorAddr: Pointer); { Error handler procedure }
C++
extern DELPHI_PACKAGE void __fastcall (*ErrorProc)(Byte ErrorCode, void * ErrorAddr);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
variable | public | System.pas System.hpp |
System | System |
Description
Points to the RTL run-time error handler.
In Delphi, ErrorProc is a procedure variable pointing to the run-time error handler. The standard ErrorProc procedure reports the run-time error and terminates the program.
The ErrorProc variable is retained primarily for compatibility with older code. Newer applications should not specify an alternate run-time error procedure using ErrorProc, as SysUtils uses this variable to convert run-time errors into exceptions.
If you use SysUtils in your program, it will force ErrorProc to its own routine and convert the run-time error into an exception. When a run-time library error occurs, the ErrorProc is called. The ErrorCode parameter contains the run-time error number and the ErrorAddr parameter contains the machine code address that caused the run-time error.
See Also
Code Examples