mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 23:59:01 +08:00
Add exception logging
CURA-1385
This commit is contained in:
parent
3e869048fd
commit
66dd4a7a50
@ -3,6 +3,7 @@ from cura.PrinterOutputDevice import PrinterOutputDevice
|
|||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty
|
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty
|
||||||
|
|
||||||
|
from UM.Logger import Logger
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
catalog = i18nCatalog("cura")
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
@ -57,8 +58,9 @@ class UMOCheckupMachineAction(MachineAction):
|
|||||||
self._output_device.endstopStateChanged.disconnect(self._onEndstopStateChanged)
|
self._output_device.endstopStateChanged.disconnect(self._onEndstopStateChanged)
|
||||||
try:
|
try:
|
||||||
self._output_device.stopPollEndstop()
|
self._output_device.stopPollEndstop()
|
||||||
except AttributeError: # Connection is probably not a USB connection. Something went pretty wrong if this happens.
|
except AttributeError as e: # Connection is probably not a USB connection. Something went pretty wrong if this happens.
|
||||||
pass
|
Logger.log("e", "An exception occurred while stopping end stop polling: %s" % str(e))
|
||||||
|
|
||||||
self._output_device = None
|
self._output_device = None
|
||||||
|
|
||||||
self._check_started = False
|
self._check_started = False
|
||||||
@ -158,7 +160,7 @@ class UMOCheckupMachineAction(MachineAction):
|
|||||||
self._output_device.hotendTemperaturesChanged.connect(self._onHotendTemperatureChanged)
|
self._output_device.hotendTemperaturesChanged.connect(self._onHotendTemperatureChanged)
|
||||||
self._output_device.endstopStateChanged.connect(self._onEndstopStateChanged)
|
self._output_device.endstopStateChanged.connect(self._onEndstopStateChanged)
|
||||||
except AttributeError as e: # Connection is probably not a USB connection. Something went pretty wrong if this happens.
|
except AttributeError as e: # Connection is probably not a USB connection. Something went pretty wrong if this happens.
|
||||||
pass
|
Logger.log("e", "An exception occurred while starting end stop polling: %s" % str(e))
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def cooldownHotend(self):
|
def cooldownHotend(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user