The OP there did not pass an extra parameter, but used the return value itself to deliver the exploding return code.
I've used this from time to time as a debugging aid, because it allows me to track down places in my code where I forget error checks. Using the exploding codes in live code is not a good idea however, because they rely on throwing in destructors, which is a bad thing to do.
https://groups.google.com/group/comp.lang.c++.moderated/brow...
The OP there did not pass an extra parameter, but used the return value itself to deliver the exploding return code.
I've used this from time to time as a debugging aid, because it allows me to track down places in my code where I forget error checks. Using the exploding codes in live code is not a good idea however, because they rely on throwing in destructors, which is a bad thing to do.