X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/7dfccdecbf326e5f3355672cfa6e0b67697652af..7cd50fbc836fa07396e60b41bc169649c38e3153:/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'