[lazarus] Better proposition for debug code.

P Jean dit Bailleul jeanditbailleulp at em.agr.ca
Wed Jul 21 09:35:22 EDT 1999


At 09:34 21/07/99 -0400, you wrote:
>michael at tfdec1.fys.kuleuven.ac.be wrote:
>> 
>> This is the default behaviour; if you set the procedural variable
>> 'asserterrorproc' then you can customize the behaviour; the
>> application just continues after the assertion handler.
>> 
>> careful; the systutils unit sets the handler, and turns it into an
>> exception. you must be sure that sysutils doesn't override your
>> handler. (normally, it should not)
>
>OK guys it seems to be 6 of one, half a dozen of another. Which way do
>we go at this? The Assertion method does seem to be fairly clean. It is
>there an only compiled it when the $ASSERTION switch is turned on.
>
>Now my question is can we monitor this switch in the code? If so then we
>can make sure that the udebug unit is also not included in the code.

For the macro way seems the better because the code will run the same with
or without the debug code. With $Assertion we may have wifferences in the
way of handling exceptions.


JDB

les opinions et recommandations exprimées dans ce courrier sont ceux de
l'auteur, ils ne sont pas nécessairement endossés par Agritulture et
AgroAlimentaire Canada
--------------------------------------------------------------
Philippe JEAN DIT BAILLEUL
Agriculture & AgroAlimentaire Canada - Agriculture & AgriFood Canada
Email : JeanDitBailleulP at em.agr.ca
Web : Http://res.agr.ca/swinenet/porcexpert/jeanditbailleulp
Tel : +1 (819) 565 9174 poste 251
Fax : +1 (819) 564 5507






More information about the Lazarus mailing list