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
@@ -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
