hubsmoke/bro

bro throws away valuable exceptions

huyz opened this issue · 1 comments

huyz commented

bro wasn't working for me and I had no idea why. The only output I got was:

The bro command isn't in our database.

    * Typing bro add will let you add bro to our database!

    * There's nothing to lose by typing bro add, it will just launch an editor with instructions.

    * Need help? Visit http://bropages.org/help

It turns out that there was a valuable Netrc::Error exception being thrown away:

Permission bits for '/Users/huyz/.netrc' should be 0600, but are 644

The exception handling at

bro/lib/bro.rb

Lines 251 to 253 in b2fbbc1

rescue
say <<-QQQ.unindent
The #{cmd_display.colored.yellow} command isn't in our database.
is a bit too coarse. Maybe it should handle RestClient::ResourceNotFound exceptions separately.

Thanks!