Programming C# C++ (7) Delphi (617) .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280) Java (8) JavaScript (31) perl (9) php (4) VBScript (1) Visual Basic (1)
Exchange Links About this site Links to us 
|
Assertions are not working?
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Does it seem that Assertions are not working? Do violate assertions not cause a 'break'?
If an assertion is violated within a try..except block, and you simply eat the exceptions, then you will not see the violation.
The reason is clear.. the assertion generates an EAssertionFailure exception which is eaten if you are running outside the IDE or in the IDE with
 | |  | | try
assert(false, 'Always a Violation');
myCode();
except
on E:EMyException do ShowMessage('myCode() failed');
else Raise; end; | |  | |  |
Comments:
|