:: Re: [DNG] C exception handling
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Steve Litt
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] C exception handling
Bob Proulx via Dng said on Fri, 1 Nov 2024 17:39:43 -0600


>A problem that often occurs is that the error handling code is never
>exercised. Error handling is only ever tested in the presence of an
>error. Unless actively unit testing and forcing every possible error
>that code is not ever executed. Errors in the error handling code
>very often occur and only when the error condition is triggered
>creating this cascade effect of not just having one actual error
>condition but then a second due to a bug in the error handling code.


Of course you're right. And more to the point, all this error handling
makes one just skip error handling alltogether when doing a lot of
coding.

Perhaps another way would be to use assert (C) or pragma assert (Ada,
and be sure to pragma assertions(Assert => Check)) for the time being,
and as runtime errors are discovered, substitute real error handling.

SteveT

Steve Litt

http://444domains.com