debug tips?

ke.han ke.han@REDACTED
Tue May 31 12:32:33 CEST 2005


I spent about two hours last night debugging a call into mnesia.  I 
finally found my error but it took a very long time to step..step..step 
through many lines before I found exactly what triggered the mnesia:abort().
The call into mnesia was:
     mnesia:create_table/2
The problem of course is the return result was simply:
{aborted,{bad_type,iserve_callback,disc_copies,'jon1@REDACTED'}}

No stack trace...just a return from the shell process.
By putting a breakpoint in mnesia_schema and stepping through for a very 
long time, I was finally able to catch the code which called 
mnesia:abort(). (There are many places in mnesia_schema where the 
mnesia:abort() is called).

I feel like there must have been a better way to close in on the error 
than what I did.  For example, is there a way to get a report when 
another process "throws" an error.  What if I have no idea, as in this 
case, how the error was generated..the "error" tuple was simply passed 
back to the Client process.  Any suggestions?

thanks, ke han



More information about the erlang-questions mailing list