RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.ErrorProc Variable

Points to the RTL runtime error handler.

Pascal
ErrorProc: procedure (ErrorCode: Byte; ErrorAddr: Pointer);
C++
procedure (ErrorCode: Byte; ErrorAddr: Pointer) ErrorProc;

System

In Delphi, ErrorProc is a procedure variable pointing to the runtime error handler. The standard ErrorProc procedure reports the runtime error and terminates the program. 

The ErrorProc variable is retained primarily for compatibility with older code. Newer applications should not specify an alternate runtime error procedure using ErrorProc as SysUtils uses this variable to convert runtime errors into exceptions. 

If you use SysUtils in your program, it will force ErrorProc to its own routine and convert the runtime error into an exception. When a runtime library error occurs, the ErrorProc is called. The ErrorCode parameter contains the runtime error number and the ErrorAddr parameter contains the machine code address that caused the runtime error. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!