cyberitsolutions / alloc-cli

A CLI that uses the alloc API
GNU Affero General Public License v3.0
1 stars 2 forks source link

Fix bug #4 #5

Closed ghost closed 8 years ago

ghost commented 8 years ago

This is safer, but if someone has the time to investigate the details, they will find ways to be even more specific. At a future date it would be good to do so.

alexlance commented 8 years ago

Ok merged.

It would be better to try and catch the specific exceptions that we are interested in (eg TypeError IndexError etc) rather than just Exception. But it is telling that since we were using bare exceptions, that we weren't all that interested in the reason why something failed :)

As far as I can see this PR will only affect the debug output that is displayed when the program is prematurely exited/interrupted. By excepting on Exception, we omit SystemExit and KeyboardInterrupt from being caught... perhaps if you interrupt a long running event it is useful to get the traceback, so I am happy to merge this PR.