]> git.ipfire.org Git - thirdparty/tornado.git/commit
Make exception handling in AsyncHTTPClient more customizable 158/head
authorAlberto García Hierro <alberto@garciahierro.com>
Sat, 2 Oct 2010 16:57:35 +0000 (18:57 +0200)
committerAlberto García Hierro <alberto@garciahierro.com>
Tue, 26 Oct 2010 20:04:16 +0000 (22:04 +0200)
commitbd4ef586e026e6bb20850215db53ced81706de37
tree0013a28a736dd9e4c13f2637c49c35b381e9eee8
parentf732f98063f8a0bf9f7e331876964bedbbdc8462
Make exception handling in AsyncHTTPClient more customizable

Call handle_callback_exception() with the callback as argument
instead of hardcoding the call to logging.debug(). This way, users
can add their own exception handling code by subclassing
AsyncHTTPClient.

Default implementation for handle_callback_exception() calls that
same function on the IOLoop associated to this AsyncHTTPClient
instance, so users can handle any exceptions raised from their
callbacks just by overriding handle_callback_exception() in IOLoop.
tornado/httpclient.py