From abe184ebff9f2e4dfb25b75d1003bece9b73a56e Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 24 Feb 2016 17:26:17 +0100 Subject: [PATCH] Do not display backend error messages for a few known error types ConnectionReset is already handled, as is BindFailed and Debug should never result in an error. Contributes to CURA-813 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 5f444db21f..b7f45cd6f3 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -26,6 +26,8 @@ import numpy from PyQt5.QtCore import QTimer +import Arcus + from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") @@ -186,9 +188,12 @@ class CuraEngineBackend(Backend): def _onSocketError(self, error): super()._onSocketError(error) + self._slicing = False self.processingProgress.emit(0) - Logger.log("e", "A socket error caused the connection to be reset") + + if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: + Logger.log("e", "A socket error caused the connection to be reset") def _onActiveProfileChanged(self): if self._profile: