diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-08-25 17:28:21 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:54 +0100 |
commit | 74b6bf4a8117b446907e45a88fe2e7f06ece29db (patch) | |
tree | 79babb2fb678244883817153c7cc2e10467eb4a1 /slack/commands.py | |
parent | fe3288e1aa8e9a497004d354bb674a26923f0b61 (diff) | |
download | wee-slack-74b6bf4a8117b446907e45a88fe2e7f06ece29db.tar.gz |
Support rendering files
Diffstat (limited to 'slack/commands.py')
-rw-r--r-- | slack/commands.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/slack/commands.py b/slack/commands.py index b1ac545..69183a2 100644 --- a/slack/commands.py +++ b/slack/commands.py @@ -9,7 +9,7 @@ from typing import Callable, Dict, List, Optional, Tuple import weechat -from slack.error import SlackRtmError, UncaughtError +from slack.error import SlackError, SlackRtmError, UncaughtError from slack.log import print_error from slack.python_compatibility import format_exception, removeprefix, removesuffix from slack.shared import shared @@ -283,6 +283,8 @@ def print_uncaught_error( if data: if isinstance(error.exception, SlackRtmError): weechat.prnt("", f" data: {json.dumps(error.exception.message_json)}") + elif isinstance(error.exception, SlackError): + weechat.prnt("", f" data: {json.dumps(error.exception.data)}") else: print_error("This error does not have any data") |