Re: Is this good style of C++?
From: Ioannis Vranos (ivr_at_remove.this.grad.com)
Date: 12/02/04
- Next message: John Nagle: "Re: Floating point errors in collision routines"
- Previous message: Mike Wahler: "Re: std::vector reallocation"
- In reply to: Kuba Ober: "Re: Is this good style of C++?"
- Next in thread: Andre Kostur: "Re: Is this good style of C++?"
- Reply: Andre Kostur: "Re: Is this good style of C++?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: John Nagle: "Re: Floating point errors in collision routines"
- Previous message: Mike Wahler: "Re: std::vector reallocation"
- In reply to: Kuba Ober: "Re: Is this good style of C++?"
- Next in thread: Andre Kostur: "Re: Is this good style of C++?"
- Reply: Andre Kostur: "Re: Is this good style of C++?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]