diff options
| author | Damien George <damien.p.george@gmail.com> | 2020-04-02 00:38:00 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2020-04-04 10:47:48 +1100 |
| commit | df156b18e517f9267bf8e4e206aa383a6e356508 (patch) | |
| tree | 47d188952f46decaf082f39d939b5d17988bc771 /docs | |
| parent | 15f41c2dbf669e1a15ce2afb59eb29f5625d9973 (diff) | |
docs,tests: Add docs and test for uasyncio custom exc handler methods.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/library/uasyncio.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/library/uasyncio.rst b/docs/library/uasyncio.rst index c0d0e85d7..641fa3345 100644 --- a/docs/library/uasyncio.rst +++ b/docs/library/uasyncio.rst @@ -266,3 +266,22 @@ Event Loop .. method:: Loop.close() Close the event loop. + +.. method:: Loop.set_exception_handler(handler) + + Set the exception handler to call when a Task raises an exception that is not + caught. The *handler* should accept two arguments: ``(loop, context)``. + +.. method:: Loop.get_exception_handler() + + Get the current exception handler. Returns the handler, or ``None`` if no + custom handler is set. + +.. method:: Loop.default_exception_handler(context) + + The default exception handler that is called. + +.. method:: Loop.call_exception_handler(context) + + Call the current exception handler. The argument *context* is passed through and + is a dictionary containing keys: ``'message'``, ``'exception'``, ``'future'``. |
