Handle exceptions that are raised by command hooks (including the main command callback.). Use this to show an error when Db credentials are missing. I'm open to better ways of doing this. I'm not too versed in Exception handling. Fixes #548.