mirror of https://github.com/python/cpython
(Merge 3.4) asyncio: Handle error handler: enhance formatting of the callback
This commit is contained in:
commit
67825605c8
|
@ -89,8 +89,8 @@ class Handle:
|
||||||
try:
|
try:
|
||||||
self._callback(*self._args)
|
self._callback(*self._args)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
msg = 'Exception in callback {}{!r}'.format(self._callback,
|
cb = _format_callback(self._callback, self._args)
|
||||||
self._args)
|
msg = 'Exception in callback {}'.format(cb)
|
||||||
self._loop.call_exception_handler({
|
self._loop.call_exception_handler({
|
||||||
'message': msg,
|
'message': msg,
|
||||||
'exception': exc,
|
'exception': exc,
|
||||||
|
|
Loading…
Reference in New Issue