System.AssertErrorProc
Delphi
AssertErrorProc: TAssertErrorProc; { Assertion error handler }
C++
extern DELPHI_PACKAGE TAssertErrorProc AssertErrorProc;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
variable | public | System.pas System.hpp |
System | System |
Description
Points to the assertion error-handler.
AssertErrorProc points to a routine that produces run-time error 227 in Delphi code. The SysUtils unit replaces it to cause an EAssertionFailed exception. If you do not use assertions, you can replace this with a method that does something else, such as call OutputDebugString to add messages to the event log (see the example).
The value of AssertErrorProc must be a procedure with the following signature:
procedure AssertErrorHandler(const Message, Filename: string; LineNumber: Integer; ErrorAddr: Pointer);
See Also
Code Examples