aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-06-11 21:19:03 +0200
committerGitHub <noreply@github.com>2018-06-11 21:19:03 +0200
commiteea510fb7839a0269fc637a9d91bb935bef60486 (patch)
tree20f093bf644a1604edeac26e89f3ca3faf24876c /wee_slack.py
parentdc15658f300f6ce2ff57ab3f493f6d72ee097db9 (diff)
downloadwee-slack-eea510fb7839a0269fc637a9d91bb935bef60486.tar.gz
Don't raise exception on missing event callbacks (#589)
These missing callbacks are not really errors or exceptions, and we don't need to implement all of them. Raising an exception makes the users think something isn't working, and is confusing.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/wee_slack.py b/wee_slack.py
index c95739b..284b08b 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -536,7 +536,7 @@ class EventRouter(object):
elif function_name in self.handlers:
self.handlers[function_name](j, self, **kwargs)
else:
- raise ProcessNotImplemented(function_name)
+ dbg("Callback not implemented for event: {}".format(function_name))
def handle_next(*args):
@@ -3572,15 +3572,6 @@ def command_p(data, current_buffer, args):
###### NEW EXCEPTIONS
-class ProcessNotImplemented(Exception):
- """
- Raised when we try to call process_(something), but
- (something) has not been defined as a function.
- """
- def __init__(self, function_name):
- super(ProcessNotImplemented, self).__init__(function_name)
-
-
class InvalidType(Exception):
"""
Raised when we do type checking to ensure objects of the wrong