Subject: Re: [boost] [Exception] Why is there no non-const version of get_error_info?
From: Jeffrey Bosboom (jbosboom_at_[hidden])
Date: 2009-08-20 02:39:31
Emil Dotchevski wrote:
> Logically, the error info interface is intended for recording various
> known facts about an exception object: "What's the name of the file
> that failed to open?" "What error code did the OS report?" Etc. etc.
> These things aren't mutable.
What about a program that translates some complicated requests into
other kinds of requests, then executes them using the same code that
handles the simple requests usually? (This is similar to translating
complex CPU instructions into a sequence of simpler ones in a scheduler,
then using the same execution units that the simple instructions use,
just that this would be in software instead of hardware.) If one of the
simple instructions throws an exception and records exception
information, this simplification must be undone at some point to not
leak the implementation detail of the simplification step.
I can't think of a concrete case for this right now, but modifying
exception information certainly seems like a reasonable thing to do (if
it can be implemented without too much difficulty). (Sorry if my
explanation wasn't terribly clear.)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk