return useful error message if file is not found

This commit is contained in:
Morgan 'ARR\!' Allen
2023-03-29 21:22:47 -07:00
parent 0b6a2ac996
commit 2d43df19a3

View File

@@ -114,7 +114,8 @@ class ObjectCustom(PathOp.ObjectOp):
gcode_file = self.findGcodeFile(obj.GcodeFile)
# could not determine the path
if not gcode_file: return
if not gcode_file:
Path.Log.error(translate("PathCustom", "Custom file %s could not be found.") % obj.GcodeFile)
with open(gcode_file) as fd:
for l in fd.readlines():