Exploding Error Codes (C++) 16 years ago
This is actually a quite old idea. Here's a comp.lang.c++.moderated thread from 2000 discussing the idea:
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.