The Right Approach to Exceptions
a at a.a
Sat Feb 18 19:49:00 PST 2012
"Sean Cavanaugh" <WorksOnMyMachine at gmail.com> wrote in message
news:jhpr9t$29i$1 at digitalmars.com...
> My C++ experience revolves around some rather large codebases that do not
> have exceptions enabled at all. The more I look into seeing what it would
> take to start using them, all I see are some pretty huge downsides:
> The exact nature of the error for a lot of exceptions for like File I/O
> are very platform specific. Throwing these objects effectively bubbles up
> highly platform specific data up to the caller, which infects the caller
> with the need to deal with platform specific data (posix codes vs
> GetLastError, vs various return values from the functions that failed
> etc). This is not a good thing for keeping a codebase isolated from
> platform differences.
Sounds like you're just dealing with some notably bad designed exceptions.
I've never come across such a problem, and I've used exeptions extensively.
More information about the Digitalmars-d