mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Made exception handling of slice info plugin way more robust
CURA-1831
This commit is contained in:
parent
b3a6fafd97
commit
57d0ad1bd0
1 changed files with 75 additions and 70 deletions
|
@ -45,6 +45,7 @@ class SliceInfo(Extension):
|
|||
Preferences.getInstance().setValue("info/asked_send_slice_info", True)
|
||||
|
||||
def _onWriteStarted(self, output_device):
|
||||
try:
|
||||
if not Preferences.getInstance().getValue("info/send_slice_info"):
|
||||
Logger.log("d", "'info/send_slice_info' is turned off.")
|
||||
return # Do nothing, user does not want to send data
|
||||
|
@ -115,4 +116,8 @@ class SliceInfo(Extension):
|
|||
Logger.log("i", "Sent anonymous slice info to %s", self.info_url)
|
||||
f.close()
|
||||
except Exception as e:
|
||||
Logger.logException("e", e)
|
||||
Logger.logException("e", "An exception occurred while trying to send slice information")
|
||||
except:
|
||||
# We really can't afford to have a mistake here, as this would break the sending of g-code to a device
|
||||
# (Either saving or directly to a printer). The functionality of the slice data is not *that* important.
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue