From e56a53a4c8b556a3d6b86d6c21ca8f802221c940 Mon Sep 17 00:00:00 2001 From: Teja Date: Sat, 25 Apr 2015 21:43:58 +0200 Subject: [PATCH] forward communication errors --- src/octoprint/util/comm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 5a3186ca..5917fc89 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -814,6 +814,13 @@ class MachineCom(object): self._changeState(self.STATE_ERROR) eventManager().fire(Events.ERROR, {"error": self.getErrorString()}) + if("error:" in line and self._state == self.STATE_PRINTING): + errorMsg = line + self._log(errorMsg) + self._errorValue = errorMsg + self._changeState(self.STATE_ERROR) + eventManager().fire(Events.ERROR, {"error": self.getErrorString()}) + if("[" in line): versionMatch = re.search("\[(?P.+)\.(?P[0-9a-f]{7})(?P-dirty)?:(?P.*)\]", line) if(versionMatch):