
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.) --Jeffrey Bosboom