There are too many places where this happens:
if (result = X())
return result;
1) Since all the error and debug logging is virtualized
as it is (using macros to syslog and fprintf), convert
then to an error stack. A log macro will push a
message onto an appropriate stack, to be popped at a
stack-specific time.
2) Possible stacks: debug, error, trace
TSP
debug, pop immediate
trace, pop immediate
error, unroll before return to app
TCSD
debug, pop immediate
trace, pop immediate
error, unroll before exit