From ba1f8c58b488ec61c400cbf4f054d285f30ca44e 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 (cherry picked from commit ac3409a) --- 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 8a570329..e36e6e92 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1322,7 +1322,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(True) return None