From 1f980361e3a82bfd133c76633b29ded7e46f4aa8 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 23 Aug 2015 02:43:04 -0400 Subject: Sandbox events so exceptions being thrown don't break the client. --- docs/api.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api.rst b/docs/api.rst index 173964f2..a161fe97 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -18,6 +18,7 @@ Event Reference ~~~~~~~~~~~~~~~~ This page outlines the different types of events listened to by :meth:`Client.event`. +All events are 'sandboxed', in that if an exception is thrown while the event is called then it is caught and then ignored. .. function:: on_ready() @@ -34,7 +35,8 @@ This page outlines the different types of events listened to by :meth:`Client.ev .. function:: on_response(response) Called whenever a message is received from the websocket. Used mainly for debugging purposes. - The parameter passed is raw data that was parsed via ``json.loads``. + The parameter passed is raw data that was parsed via ``json.loads``. Note that this is called + before the :class:`Client` processes the event. :param response: The received message response after gone through ``json.loads``. -- cgit v1.2.3