X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/7dfccdecbf326e5f3355672cfa6e0b67697652af..28063e4b7779eff7ac0fa5c9939545d2091ef24c:/pymindaemon.py diff --git a/pymindaemon.py b/pymindaemon.py index c3fdda6..b7e56e4 100644 --- a/pymindaemon.py +++ b/pymindaemon.py @@ -65,8 +65,13 @@ class PyminDaemon(eventloop.EventLoop): if result is not None: result = serializer.serialize(result) response = u'OK ' + except dispatcher.Error, e: + result = unicode(e) + u'\n' + response = u'ERROR ' except Exception, e: - result = unicode(e) + import traceback + result = u'Internal server error' + traceback.print_exc() # TODO logging! response = u'ERROR ' if result is None: response += u'0'