Re: Is this good style of C++?

From: Ioannis Vranos (ivr_at_remove.this.grad.com)
Date: 12/02/04


Date: Thu, 02 Dec 2004 20:06:06 +0200

Kuba Ober wrote:

> Unless errors are frequent and expected, in which case exceptions are not
> such a good choice. Throwing an exception typically has big overheads, so
> unless given error is *exceptional*, it should be handled w/o throwing an
> exception. Network code comes to mind, if transmission errors, timeouts
> etc. are frequent.

Well, my experience is in .NET, where every error is signified as an
exception and not as a return value, and so far I had no problems with
it. Also all the C++ standard library with the exception of the C
subset, uses exceptions to signify run-time errors.

-- 
Ioannis Vranos
http://www23.brinkster.com/noicys