lfe-deprecated / lfetool

DEPRECATED - See:
https://github.com/lfe-rebar3/
Other
61 stars 19 forks source link

Entering an unknown command shows stacktrace #80

Closed oubiwann closed 10 years ago

oubiwann commented 10 years ago

E.g.:

$ lfetool2 commsnfd
show usage here ...
{"init terminating in do_boot",
  {badarg,
    [{lfe_io,fwrite1,["~s~n",  
      [[10,85,110,107,110,111,119,110,32,99,111,
        109,109,97,110,100,58,32,39,99,111,109,
        109,115,110,102,100,39,10,10|ok]]],
    [{file,"src/lfe_io.erl"},
     {line,306}]},
     {lfe_io,format,3,
      [{file,"src/lfe_io.erl"},{line,296}]},
     {erl_eval,do_apply,6,
      [{file,"erl_eval.erl"},{line,657}]},
     {erl_eval,expr,5,
      [{file,"erl_eval.erl"},{line,272}]},
     {init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
rvirding commented 10 years ago

Did you find what wrong here? What caused the the 'badarg' error was that the string to be printed was not a proper list and ended in an 'ok'.

oubiwann commented 10 years ago

Wow, thanks for taking a look, Robert! Totally unexpected :-)

(And sorry for the late response :-( )

Yes, indeed -- you're exactly correct -- thanks for the catch! I'd changed some code as part of a refactor, but hadn't changed all the old forms to the new, so there were some nested calls to io:format that should have been pulled out of some concatenations.

Fixed in 3cffa26.