ExceptObjProc Variable
var ExceptObjProc: Pointer; functionExceptProc
(var Rec: TExceptionRecord): TObject; begin ... end; ... ExceptObjProc := @ExceptProc
;
When a Windows exception occurs, Delphi calls the procedure
ExceptObjProc
points to (if the variable is not
nil
). The ExceptObjProc
function returns a new exception object that corresponds to the
Windows exception. If ExceptObjProc
is
nil
or if it returns nil
,
Delphi lets the Windows exception terminate the application.
The sole argument to the ExceptObjProc
function is
a pointer to an exception record.
The Windows
unit defines the
TExceptionRecord
type. See the Windows Platform
SDK documentation to learn about this record.
The SysUtils
unit sets
ExceptObjProc
to a function that maps all the
Windows exceptions to appropriate Delphi exceptions, e.g.,
Status_Integer_Overflow
becomes an
EIntOverflow
object.