git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10d0851
)
Extract caught exception.
author
CMDR furrycat
<elite@furrycat.net>
Wed, 11 Oct 2017 09:53:13 +0000
(10:53 +0100)
committer
CMDR furrycat
<elite@furrycat.net>
Wed, 11 Oct 2017 09:53:34 +0000
(10:53 +0100)
eddn.py
patch
|
blob
|
history
diff --git
a/eddn.py
b/eddn.py
index
feab50b
..
dec27b8
100644
(file)
--- a/
eddn.py
+++ b/
eddn.py
@@
-2,6
+2,7
@@
import asyncio
import json
import logging
import re
+import traceback
import zlib
import zmq
import zmq.asyncio
@@
-16,8
+17,8
@@
state = { 'loop': None, 'context': None, 'subscriber': None }
def exception_callback(loop, context):
if 'exception' in context:
- log.exception('asyncio.loop')
- raise
+ e = context['exception']
+ log.error(''.join(['Caught {}\n'.format(e)] + traceback.format_list(traceback.extract_tb(e.__traceback__)) + [e.__repr__()]))
def init():
state['loop'] = zmq.asyncio.ZMQEventLoop()