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: The following searches are equivalent: 'delphi and not database', '+delphi -database', 'delphi -database'
 
 
Originally created by
Tamarack Associates
Mon, 20 May 2024 00:19:07 UTC
Copyright © 2009-2024
HREF Tools Corp.