Article

From:
To:
Barry Kelly
Subject:
Re: Exceptions vs Error codes
Newsgroup:
borland.public.delphi.objectpascal

Re: Exceptions vs Error codes

In article <‚úČ4ax.com>, ‚úČeircom.net says...
> Please list some valid uses of exception-swallowing try..except blocks
> 

Catch a database deadlock exception. Retry (once) the transaction.
Catch "TCP/IP connection broken" when writing. Try to reconnect and rewrite (once).
Catch an AV exception. Stop and restart the unattended application.

....
> I'll show you that the majority should have checked for error before
> doing whatever raised the exception.

Basically, I agree. Still, as you know, volatile or complex
preconditions cannot be checked beforehand.

--- Raoul
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Tue, 05 Dec 2023 01:48:16 UTC
Copyright © 2009-2023
HREF Tools Corp.