new stack backtrace
Martin Bjorklund
mbj@REDACTED
Tue Dec 14 11:28:18 CET 1999
Robert Virding <rv@REDACTED> wrote:
> Easy. Seeing the call to config_file:parse_string/1 is the LAST CALL in
> ibgetconfig/1 which is the LAST CALL in bgetconfig/2 then the last call
> optimisation removes all traces of bgetconfig/2 and ibgetconfig/1.
So this is waht happens:
the call to bt_cmd:bgetconfig is pushed onto the stack
since bgetconfig is tail-recursive, bgetconfig is popped, and
ibgetconfig is pushed.
since ibgetconfig is tail-recursive, ibgetconfig is popped, but
before config_file:parse_string is pushed, the error handler is
invoked because config_file doesn't exist.
Interesting.
Maybe the check for config_file:parse_string/1 could be done before
ibgetconfig is popped.
/martin
More information about the erlang-questions
mailing list