On 2/6/2014, 5:10 PM, Guido van Rossum wrote:
On Thu, Feb 6, 2014 at 1:15 PM, Yury Selivanov <yselivanov...@gmail.com>wrote:

So let me reiterate on the proposed design:

This design looks good to me.

loop.set_exception_handler(handler)
    Sets 'handler' as a new unhandled exceptions handler.

I'd sy as "the" [...] handler. There is at most one handler, and setting it
irrevocably overrides the previous handler.


    If 'handler' is a callable object, then it should
    have the following signature (or compatible one):
    "(loop, exception, message)".

    If 'callback' is None, default event loop exceptions
    handler will be set.


loop.default_exception_handler(exception, message)
    Triggers default exceptions handler of the event loop.


loop.call_exception_handler(exception, message)
    Triggers the exceptions handler set with
    'set_exception_handler'.

    If there was no custom exceptions handler set, the
    default one is triggered.

I guess the next step is specifying when this is called. Or just a patch.
:-)

I'll start working on the patch then..

Yury

Reply via email to