diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2017-09-16 22:00:07 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2017-09-17 00:04:04 +0200 |
commit | 564d48486a7087727ffcc5ec1b77430b96e66469 (patch) | |
tree | 0b3ee3526933f7850948c2403972e9336d3af18e /wee_slack.py | |
parent | e4395d0c44feaf488b9fea82213d115a91645cbe (diff) | |
download | wee-slack-564d48486a7087727ffcc5ec1b77430b96e66469.tar.gz |
Improve error message when weemoji.json is not found
By printing the exception instead of sys.exc_info, we get more useful
error messages, including the path to the file it is trying to load if
it can't find it.
Fixes #431
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index f239cdd..0caab43 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3234,8 +3234,8 @@ def load_emoji(): ef = open('{}/weemoji.json'.format(DIR), 'r') EMOJI = json.loads(ef.read()) ef.close() - except: - dbg("Unexpected error: {}".format(sys.exc_info()), 5) + except Exception as e: + dbg("Couldn't load emoji list: {}".format(e), 5) return w.WEECHAT_RC_OK |