From ac3409a22371470af0d39e7752b83ce22313bd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 13 Aug 2015 12:05:08 +0200 Subject: [PATCH] Log exception on error while reading from serial --- src/octoprint/util/comm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index b4745b74..c13abc78 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1373,7 +1373,8 @@ class MachineCom(object): try: ret = self._serial.readline() except: - self._log("Unexpected error while reading serial port: %s" % (get_exception_string())) + self._logger.exception("Unexpected error while reading from serial port") + self._log("Unexpected error while reading serial port, please consult octoprint.log for details: %s" % (get_exception_string())) self._errorValue = get_exception_string() self.close(is_error=True) return None