RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.AssertErrorProc Variable

Points to the assertion error-handler.

Pascal
AssertErrorProc: TAssertErrorProc;
C++
TAssertErrorProc AssertErrorProc;

System

AssertErrorProc points to a routine that produces runtime 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 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); 

 

EAssertionFailed 

Assert 

ErrorProc

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