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
Fri, 15 Nov 2024 06:44:35 UTC
Copyright © 2009-2024
HREF Tools Corp.