- all the logs done on Exception are now errors (with the exception of few places where the Exception is expected)
This commit is contained in:
@@ -204,7 +204,7 @@ class AppObject(QtCore.QObject):
|
||||
obj.options['xmax'] = xmax
|
||||
obj.options['ymax'] = ymax
|
||||
except Exception as e:
|
||||
self.app.log.warning("AppObject.new_object() -> The object has no bounds properties. %s" % str(e))
|
||||
self.app.log.error("AppObject.new_object() -> The object has no bounds properties. %s" % str(e))
|
||||
return "fail"
|
||||
|
||||
self.app.log.debug("Moving new object back to main thread.")
|
||||
@@ -321,7 +321,7 @@ class AppObject(QtCore.QObject):
|
||||
obj.outline_color = self.app.defaults["gerber_plot_line"]
|
||||
obj.fill_color = self.app.defaults["gerber_plot_fill"]
|
||||
except Exception as e:
|
||||
self.app.log.warning("AppObject.new_object() -> setting colors error. %s" % str(e))
|
||||
self.app.log.error("AppObject.new_object() -> setting colors error. %s" % str(e))
|
||||
|
||||
# #############################################################################################################
|
||||
# update the SHELL auto-completer model with the name of the new object
|
||||
|
||||
@@ -956,7 +956,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
except (ObjectDeleted, AttributeError):
|
||||
self.probing_shapes.clear(update=True)
|
||||
except Exception as e:
|
||||
self.app.log.debug("CNCJobObject.plot_probing_geo() --> %s" % str(e))
|
||||
self.app.log.error("CNCJobObject.plot_probing_geo() --> %s" % str(e))
|
||||
else:
|
||||
self.probing_shapes.clear(update=True)
|
||||
|
||||
@@ -977,7 +977,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
pts_union = MultiPoint(pts)
|
||||
voronoi_union = voronoi_diagram(geom=pts_union, envelope=env)
|
||||
except Exception as e:
|
||||
self.app.log.debug("CNCJobObject.generate_voronoi_geometry() --> %s" % str(e))
|
||||
self.app.log.error("CNCJobObject.generate_voronoi_geometry() --> %s" % str(e))
|
||||
for pt_index in range(len(pts)):
|
||||
new_pts[pt_index] = affinity.translate(
|
||||
new_pts[pt_index], random.random() * 1e-09, random.random() * 1e-09)
|
||||
@@ -1419,7 +1419,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
try:
|
||||
self.app.inform_shell.emit('\t\t\t: ' + line.decode('utf-8').strip().upper())
|
||||
except Exception as e:
|
||||
self.app.log.debug("CNCJobObject.send_grbl_command() --> %s" % str(e))
|
||||
self.app.log.error("CNCJobObject.send_grbl_command() --> %s" % str(e))
|
||||
if 'ok' in line:
|
||||
result = grbl_out
|
||||
|
||||
@@ -1442,7 +1442,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
try:
|
||||
self.app.inform_shell.emit(' : ' + line.decode('utf-8').strip().upper())
|
||||
except Exception as e:
|
||||
self.app.log.debug("CNCJobObject.send_grbl_block() --> %s" % str(e))
|
||||
self.app.log.error("CNCJobObject.send_grbl_block() --> %s" % str(e))
|
||||
|
||||
def on_grbl_get_parameter(self, param):
|
||||
if '$' in param:
|
||||
@@ -1730,7 +1730,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
try:
|
||||
self.gcode_viewer_tab.load_text(gco, move_to_start=True, clear_text=True)
|
||||
except Exception as e:
|
||||
self.app.log.debug('FlatCAMCNCJob.on_edit_probing_gcode() -->%s' % str(e))
|
||||
self.app.log.error('FlatCAMCNCJob.on_edit_probing_gcode() -->%s' % str(e))
|
||||
return
|
||||
|
||||
self.gcode_viewer_tab.t_frame.show()
|
||||
@@ -1974,7 +1974,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
# postamble = self.append_snippet
|
||||
# gc = self.export_gcode(filename, preamble=preamble, postamble=postamble)
|
||||
# except Exception as err:
|
||||
# log.debug("CNCJobObject.export_gcode_handler() --> %s" % str(err))
|
||||
# log.error("CNCJobObject.export_gcode_handler() --> %s" % str(err))
|
||||
# gc = self.export_gcode(filename)
|
||||
#
|
||||
# if gc == 'fail':
|
||||
@@ -2049,7 +2049,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
# self.gcode_editor_tab.load_text(self.app.gcode_edited.getvalue(), move_to_start=True, clear_text=True)
|
||||
self.gcode_editor_tab.load_text(self.app.gcode_edited, move_to_start=True, clear_text=True)
|
||||
except Exception as e:
|
||||
self.app.log.debug('FlatCAMCNCJob.on_review_code_click() -->%s' % str(e))
|
||||
self.app.log.error('FlatCAMCNCJob.on_review_code_click() -->%s' % str(e))
|
||||
return
|
||||
|
||||
self.gcode_editor_tab.t_frame.show()
|
||||
|
||||
@@ -730,7 +730,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||
excellon_code += "X{xform}Y{yform}\n".format(xform=exc_x_formatted,
|
||||
yform=exc_y_formatted)
|
||||
except Exception as e:
|
||||
self.app.log.debug('ExcellonObject.export_excellon() drills -> %s' % str(e))
|
||||
self.app.log.error('ExcellonObject.export_excellon() drills -> %s' % str(e))
|
||||
|
||||
# slots processing
|
||||
try:
|
||||
@@ -830,7 +830,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||
xstop=stop_slot_x_formatted, ystop=stop_slot_y_formatted
|
||||
)
|
||||
except Exception as e:
|
||||
self.app.log.debug('ExcellonObject.export_excellon() slots -> %s' % str(e))
|
||||
self.app.log.error('ExcellonObject.export_excellon() slots -> %s' % str(e))
|
||||
|
||||
if not has_drills and not has_slots:
|
||||
self.app.log.debug("ExcellonObject.export_excellon() --> Excellon Object is empty: no drills, no slots.")
|
||||
|
||||
@@ -99,7 +99,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
tools_diameters = [eval(a) for a in tools_string if a != '']
|
||||
self.options["tools_mill_tooldia"] = tools_diameters[0] if tools_diameters else 0.0
|
||||
except Exception as e:
|
||||
self.app.log.debug("FlatCAMObj.GeometryObject.init() --> %s" % str(e))
|
||||
self.app.log.error("FlatCAMObj.GeometryObject.init() --> %s" % str(e))
|
||||
|
||||
self.options["startz"] = self.app.defaults["geometry_startz"]
|
||||
|
||||
@@ -257,7 +257,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
# try:
|
||||
# self.ui.tool_offset_entry.set_value(tooluid_value['offset_value'])
|
||||
# except Exception as e:
|
||||
# log.debug("build_ui() --> Could not set the 'offset_value' key in self.tools. Error: %s" % str(e))
|
||||
# log.error("build_ui() --> Could not set the 'offset_value' key in self.tools. Error: %s" % str(e))
|
||||
|
||||
row_idx += 1
|
||||
|
||||
@@ -319,7 +319,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
# self.update_ui()
|
||||
except Exception as e:
|
||||
# when the tools table is empty there will be this error but once the table is populated it will go away
|
||||
self.app.log.debug('GeometryObject.build_ui() -> %s' % str(e))
|
||||
self.app.log.error('GeometryObject.build_ui() -> %s' % str(e))
|
||||
|
||||
# disable the Plot column in Tool Table if the geometry is SingleGeo as it is not needed
|
||||
# and can create some problems
|
||||
@@ -816,7 +816,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.ui.tool_offset_entry.hide()
|
||||
self.ui.tool_offset_lbl.hide()
|
||||
except Exception as e:
|
||||
self.app.log.debug("set_tool_offset_visibility() --> " + str(e))
|
||||
self.app.log.error("set_tool_offset_visibility() --> " + str(e))
|
||||
return
|
||||
|
||||
def on_offset_value_edited(self):
|
||||
@@ -1091,7 +1091,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.ui_connect()
|
||||
return
|
||||
except Exception as e:
|
||||
self.app.log.debug("Tool missing. Add a tool in Geo Tool Table. %s" % str(e))
|
||||
self.app.log.error("Tool missing. Add a tool in Geo Tool Table. %s" % str(e))
|
||||
self.ui_connect()
|
||||
return
|
||||
|
||||
@@ -1117,7 +1117,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.ui_connect()
|
||||
return
|
||||
except Exception as e:
|
||||
self.app.log.debug("Tool missing. Add a tool in Geo Tool Table. %s" % str(e))
|
||||
self.app.log.error("Tool missing. Add a tool in Geo Tool Table. %s" % str(e))
|
||||
self.ui_connect()
|
||||
return
|
||||
|
||||
@@ -1134,7 +1134,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.ui_connect()
|
||||
return
|
||||
except Exception as e:
|
||||
self.app.log.debug("Tool missing in ui_update_v_shape(). Add a tool in Geo Tool Table. %s" % str(e))
|
||||
self.app.log.error("Tool missing in ui_update_v_shape(). Add a tool in Geo Tool Table. %s" % str(e))
|
||||
return
|
||||
|
||||
# #########################################################################################################
|
||||
@@ -1155,7 +1155,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
if key == 'tool_type' and value == 'V':
|
||||
self.on_update_cutz()
|
||||
except Exception as e:
|
||||
self.app.log.debug("GeometryObject.update_ui() -> %s " % str(e))
|
||||
self.app.log.error("GeometryObject.update_ui() -> %s " % str(e))
|
||||
|
||||
self.ui_connect()
|
||||
|
||||
@@ -1479,7 +1479,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.builduiSig.emit()
|
||||
return
|
||||
except Exception as e:
|
||||
self.app.log.debug("on_tool_copy() --> " + str(e))
|
||||
self.app.log.error("on_tool_copy() --> " + str(e))
|
||||
# deselect the table
|
||||
# self.ui.geo_tools_table.clearSelection()
|
||||
else:
|
||||
@@ -1496,7 +1496,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.tools[int(max_uid)] = deepcopy(temp_tools[tooluid])
|
||||
temp_tools.clear()
|
||||
except Exception as e:
|
||||
self.app.log.debug("on_tool_copy() --> " + str(e))
|
||||
self.app.log.error("on_tool_copy() --> " + str(e))
|
||||
|
||||
# if there are no more tools in geo tools table then hide the tool offset
|
||||
if not self.tools:
|
||||
@@ -1580,7 +1580,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.builduiSig.emit()
|
||||
return
|
||||
except Exception as e:
|
||||
self.app.log.debug("on_tool_delete() --> " + str(e))
|
||||
self.app.log.error("on_tool_delete() --> " + str(e))
|
||||
# deselect the table
|
||||
# self.ui.geo_tools_table.clearSelection()
|
||||
else:
|
||||
@@ -1758,7 +1758,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
try:
|
||||
self.form_fields[form_key].set_value(dict_storage[form_key])
|
||||
except Exception as e:
|
||||
self.app.log.debug('GeometryObject.update_form() -> %s' % str(e))
|
||||
self.app.log.error('GeometryObject.update_form() -> %s' % str(e))
|
||||
|
||||
# this is done here because those buttons control through OptionalInputSelection if some entry's are Enabled
|
||||
# or not. But due of using the ui_disconnect() status is no longer updated and I had to do it here
|
||||
@@ -1844,7 +1844,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
if widget_idx == 1 or widget_idx == 3:
|
||||
self.on_update_cutz()
|
||||
except Exception as e:
|
||||
self.app.log.debug("GeometryObject.gui_form_to_storage() -- wdg index -> %s" % str(e))
|
||||
self.app.log.error("GeometryObject.gui_form_to_storage() -- wdg index -> %s" % str(e))
|
||||
|
||||
# the original connect() function of the OptionalInputSelection is no longer working because of the
|
||||
# ui_diconnect() so I use this 'hack'
|
||||
@@ -1975,7 +1975,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
# points = GeometryObject.get_pts(geo)
|
||||
# msp.add_lwpolyline(points)
|
||||
except Exception as e:
|
||||
self.app.log.debug(str(e))
|
||||
self.app.log.error(str(e))
|
||||
|
||||
return dwg
|
||||
|
||||
@@ -2220,7 +2220,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
xmax = self.options['xmax']
|
||||
ymax = self.options['ymax']
|
||||
except Exception as e:
|
||||
self.app.log.debug("FlatCAMObj.GeometryObject.mtool_gen_cncjob() --> %s\n" % str(e))
|
||||
self.app.log.error("FlatCAMObj.GeometryObject.mtool_gen_cncjob() --> %s\n" % str(e))
|
||||
|
||||
msg = '[ERROR] %s' % _("An internal error has occurred. See shell.\n")
|
||||
msg += '%s' % str(e)
|
||||
@@ -2790,7 +2790,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
except grace:
|
||||
return "fail"
|
||||
except Exception as e:
|
||||
self.app.log.debug("Could not Paint the polygons. %s" % str(e))
|
||||
self.app.log.error("Could not Paint the polygons. %s" % str(e))
|
||||
mssg = '[ERROR] %s\n%s' % (_("Could not do Paint. Try a different combination of parameters. "
|
||||
"Or a different method of Paint"), str(e))
|
||||
self.app.inform.emit(mssg)
|
||||
@@ -3237,7 +3237,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
if not self.app.exc_areas.exclusion_areas_storage:
|
||||
self.app.exc_areas.clear_shapes()
|
||||
except Exception as err:
|
||||
self.app.log.debug('GeometryObject.area_disconnect() -> %s' % str(err))
|
||||
self.app.log.error('GeometryObject.area_disconnect() -> %s' % str(err))
|
||||
|
||||
def plot_element(self, element, color=None, visible=None):
|
||||
|
||||
@@ -3425,7 +3425,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
try:
|
||||
new_options[option] = deepcopy(geo_obj.options[option])
|
||||
except Exception as e:
|
||||
log.warning("Failed to copy option %s. Error: %s" % (str(option), str(e)))
|
||||
log.error("Failed to copy option %s. Error: %s" % (str(option), str(e)))
|
||||
|
||||
# Expand lists
|
||||
if type(geo_obj) is list:
|
||||
@@ -3440,7 +3440,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
try:
|
||||
new_solid_geometry += deepcopy(geo_obj.solid_geometry)
|
||||
except Exception as e:
|
||||
log.debug("GeometryObject.merge() --> %s" % str(e))
|
||||
log.error("GeometryObject.merge() --> %s" % str(e))
|
||||
|
||||
# find the tool_uid maximum value in the geo_final
|
||||
try:
|
||||
|
||||
@@ -741,7 +741,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
try:
|
||||
geom = self.isolation_geometry(offset, geometry=geometry, iso_type=env_iso_type, passes=nr_passes)
|
||||
except Exception as e:
|
||||
self.app.log.debug('GerberObject.isolate().generate_envelope() --> %s' % str(e))
|
||||
self.app.log.error('GerberObject.isolate().generate_envelope() --> %s' % str(e))
|
||||
return 'fail'
|
||||
|
||||
if invert:
|
||||
@@ -763,7 +763,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
self.app.log.debug("GerberObject.isolate().generate_envelope() Error --> Unexpected Geometry %s" %
|
||||
type(geom))
|
||||
except Exception as e:
|
||||
self.app.log.debug("GerberObject.isolate().generate_envelope() Error --> %s" % str(e))
|
||||
self.app.log.error("GerberObject.isolate().generate_envelope() Error --> %s" % str(e))
|
||||
return 'fail'
|
||||
return geom
|
||||
|
||||
@@ -874,7 +874,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
self.clear_plot_apertures()
|
||||
self.mark_shapes.enabled = False
|
||||
except Exception as e:
|
||||
self.app.log.debug(" GerberObject.on_aperture_visibility_changed() --> %s" % str(e))
|
||||
self.app.log.error(" GerberObject.on_aperture_visibility_changed() --> %s" % str(e))
|
||||
|
||||
def convert_units(self, units):
|
||||
"""
|
||||
@@ -999,7 +999,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
except (ObjectDeleted, AttributeError):
|
||||
self.shapes.clear(update=True)
|
||||
except Exception as e:
|
||||
self.app.log.debug("GerberObject.plot() --> %s" % str(e))
|
||||
self.app.log.error("GerberObject.plot() --> %s" % str(e))
|
||||
|
||||
# experimental plot() when the solid_geometry is stored in the self.apertures
|
||||
def plot_aperture(self, only_flashes=False, run_thread=False, **kwargs):
|
||||
@@ -1060,7 +1060,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
except (ObjectDeleted, AttributeError):
|
||||
app_obj.clear_plot_apertures()
|
||||
except Exception as e:
|
||||
self.app.log.debug("GerberObject.plot_aperture() --> %s" % str(e))
|
||||
self.app.log.error("GerberObject.plot_aperture() --> %s" % str(e))
|
||||
|
||||
if run_thread:
|
||||
self.app.worker_task.emit({'fcn': job_thread, 'params': [self]})
|
||||
@@ -1083,7 +1083,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
try:
|
||||
self.mark_shapes.remove(shape_key)
|
||||
except Exception as e:
|
||||
self.app.log.debug("GerberObject.clear_plot_apertures() -> %s" % str(e))
|
||||
self.app.log.error("GerberObject.clear_plot_apertures() -> %s" % str(e))
|
||||
|
||||
self.mark_shapes_storage[aperture] = []
|
||||
self.mark_shapes.redraw()
|
||||
@@ -1330,7 +1330,8 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
|
||||
# gerber_code += "D02*\n"
|
||||
except Exception as e:
|
||||
self.app.log.debug("FlatCAMObj.GerberObject.export_gerber() 'follow' --> %s" % str(e))
|
||||
self.app.log.error(
|
||||
"FlatCAMObj.GerberObject.export_gerber() 'follow' --> %s" % str(e))
|
||||
if 'clear' in geo_elem:
|
||||
geo = geo_elem['clear']
|
||||
if not geo.is_empty:
|
||||
@@ -1364,7 +1365,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
gerber_code += 'G37*\n'
|
||||
gerber_code += '%LPD*%\n'
|
||||
except Exception as e:
|
||||
self.app.log.debug("FlatCAMObj.GerberObject.export_gerber() '0' aperture --> %s" % str(e))
|
||||
self.app.log.error("FlatCAMObj.GerberObject.export_gerber() '0' aperture --> %s" % str(e))
|
||||
|
||||
for apid in self.apertures:
|
||||
if apid == '0':
|
||||
@@ -1415,7 +1416,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
|
||||
# gerber_code += "D02*\n"
|
||||
except Exception as e:
|
||||
self.app.log.debug("FlatCAMObj.GerberObject.export_gerber() 'follow' --> %s" % str(e))
|
||||
self.app.log.error("FlatCAMObj.GerberObject.export_gerber() 'follow' --> %s" % str(e))
|
||||
|
||||
try:
|
||||
if 'clear' in geo_elem:
|
||||
@@ -1519,7 +1520,7 @@ class GerberObject(FlatCAMObj, Gerber):
|
||||
# gerber_code += "D02*\n"
|
||||
gerber_code += '%LPD*%\n'
|
||||
except Exception as e:
|
||||
self.app.log.debug("FlatCAMObj.GerberObject.export_gerber() 'clear' --> %s" % str(e))
|
||||
self.app.log.error("FlatCAMObj.GerberObject.export_gerber() 'clear' --> %s" % str(e))
|
||||
|
||||
if not self.apertures:
|
||||
self.app.log.debug("FlatCAMObj.GerberObject.export_gerber() --> Gerber Object is empty: no apertures.")
|
||||
|
||||
@@ -222,7 +222,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
self.app.ui.properties_scroll_area.takeWidget()
|
||||
# self.ui.scale_entry.returnPressed.connect(self.on_scale_button_click)
|
||||
except Exception as e:
|
||||
self.app.log.debug("FlatCAMObj.build_ui() --> Nothing to remove: %s" % str(e))
|
||||
self.app.log.error("FlatCAMObj.build_ui() --> Nothing to remove: %s" % str(e))
|
||||
|
||||
self.app.ui.properties_scroll_area.setWidget(self.ui)
|
||||
# self.ui.setMinimumWidth(100)
|
||||
@@ -275,7 +275,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
factor = float(self.ui.scale_entry.get_value())
|
||||
except Exception as e:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Scaling could not be executed."))
|
||||
log.debug("FlatCAMObj.on_scale_button_click() -- %s" % str(e))
|
||||
log.error("FlatCAMObj.on_scale_button_click() -- %s" % str(e))
|
||||
return
|
||||
|
||||
if type(factor) != float:
|
||||
@@ -327,7 +327,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
try:
|
||||
self.set_form_item(option)
|
||||
except Exception as err:
|
||||
self.app.log.warning("Unexpected error: %s" % str(sys.exc_info()), str(err))
|
||||
self.app.log.error("Unexpected error: %s" % str(sys.exc_info()), str(err))
|
||||
|
||||
def read_form(self):
|
||||
"""
|
||||
@@ -523,7 +523,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
length = abs(xmax - xmin)
|
||||
width = abs(ymax - ymin)
|
||||
except Exception as ee:
|
||||
log.debug("FlatCAMObj.add_properties_items() -> calculate dimensions --> %s" % str(ee))
|
||||
log.error("FlatCAMObj.add_properties_items() -> calculate dimensions --> %s" % str(ee))
|
||||
|
||||
# calculate box area
|
||||
if self.app.defaults['units'].lower() == 'mm':
|
||||
@@ -554,7 +554,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
xmax.append(x1)
|
||||
ymax.append(y1)
|
||||
except Exception as ee:
|
||||
log.debug("FlatCAMObj.add_properties_items() cncjob --> %s" % str(ee))
|
||||
log.error("FlatCAMObj.add_properties_items() cncjob --> %s" % str(ee))
|
||||
|
||||
try:
|
||||
for tool_k in obj_prop.cnc_tools:
|
||||
@@ -564,7 +564,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
xmax.append(x1)
|
||||
ymax.append(y1)
|
||||
except Exception as ee:
|
||||
log.debug("FlatCAMObj.add_properties_items() cncjob --> %s" % str(ee))
|
||||
log.error("FlatCAMObj.add_properties_items() cncjob --> %s" % str(ee))
|
||||
else:
|
||||
try:
|
||||
if obj_prop.tools:
|
||||
@@ -579,7 +579,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
xmax.append(x1)
|
||||
ymax.append(y1)
|
||||
except Exception as ee:
|
||||
log.debug("FlatCAMObj.add_properties_items() not cncjob tools --> %s" % str(ee))
|
||||
log.error("FlatCAMObj.add_properties_items() not cncjob tools --> %s" % str(ee))
|
||||
|
||||
if xmin and ymin and xmax and ymax:
|
||||
xmin = min(xmin)
|
||||
@@ -640,7 +640,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
area_chull = max(area_chull_list)
|
||||
except Exception as er:
|
||||
area_chull = None
|
||||
log.debug("FlatCAMObj.add_properties_items() area chull--> %s" % str(er))
|
||||
log.error("FlatCAMObj.add_properties_items() area chull--> %s" % str(er))
|
||||
|
||||
if self.app.defaults['units'].lower() == 'mm' and area_chull:
|
||||
area_chull = area_chull / 100
|
||||
|
||||
@@ -133,7 +133,7 @@ class ScriptObject(FlatCAMObj):
|
||||
# self.script_editor_tab.code_editor.setPlainText(self.source_file)
|
||||
self.script_editor_tab.load_text(self.source_file, move_to_end=True)
|
||||
except Exception as e:
|
||||
log.debug("ScriptObject.set_ui() --> %s" % str(e))
|
||||
log.error("ScriptObject.set_ui() --> %s" % str(e))
|
||||
|
||||
self.script_editor_tab.t_frame.show()
|
||||
|
||||
@@ -208,7 +208,7 @@ class ScriptObject(FlatCAMObj):
|
||||
except tk.TclError:
|
||||
old_line = old_line + tcl_command_line + '\n'
|
||||
except Exception as e:
|
||||
log.debug("ScriptObject.handleRunCode() --> %s" % str(e))
|
||||
log.error("ScriptObject.handleRunCode() --> %s" % str(e))
|
||||
|
||||
if old_line != '':
|
||||
# it means that the script finished with an error
|
||||
|
||||
@@ -521,7 +521,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
self.app.myKeywords.append(new_name)
|
||||
self.app.shell._edit.set_model_data(self.app.myKeywords)
|
||||
except Exception as e:
|
||||
self.app.log.debug(
|
||||
self.app.log.error(
|
||||
"setData() --> Could not remove the old object name from auto-completer model list. %s" %
|
||||
str(e))
|
||||
# obj.build_ui()
|
||||
@@ -657,7 +657,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
xmax = max([xmax, gxmax])
|
||||
ymax = max([ymax, gymax])
|
||||
except Exception as e:
|
||||
self.app.log.warning("DEV WARNING: Tried to get bounds of empty geometry. %s" % str(e))
|
||||
self.app.log.error("Tried to get bounds of empty geometry. %s" % str(e))
|
||||
|
||||
return [xmin, ymin, xmax, ymax]
|
||||
|
||||
@@ -708,7 +708,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
# this is not needed any more because now the code editor is created on demand
|
||||
# self.app.ui.code_editor.set_model_data(self.app.myKeywords)
|
||||
except Exception as e:
|
||||
self.app.log.debug(
|
||||
self.app.log.error(
|
||||
"delete_active() --> Could not remove the old object name from auto-completer model list. %s" % str(e))
|
||||
|
||||
self.app.object_status_changed.emit(active.obj, 'delete', name)
|
||||
@@ -761,7 +761,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
# this is not needed any more because now the code editor is created on demand
|
||||
# self.app.ui.code_editor.set_model_data(self.app.myKeywords)
|
||||
except Exception as e:
|
||||
self.app.log.debug(
|
||||
self.app.log.error(
|
||||
"delete_by_name() --> Could not remove the old object name from auto-completer model list. %s" % str(e))
|
||||
|
||||
self.app.object_status_changed.emit(deleted.obj, 'delete', name)
|
||||
@@ -823,7 +823,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
|
||||
self.app.plotcanvas.redraw()
|
||||
except Exception as e:
|
||||
self.app.log.debug("ObjectCollection.delete_all() --> %s" % str(e))
|
||||
self.app.log.error("ObjectCollection.delete_all() --> %s" % str(e))
|
||||
|
||||
def get_active(self):
|
||||
"""
|
||||
@@ -987,7 +987,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
try:
|
||||
self.app.ui.properties_scroll_area.takeWidget()
|
||||
except Exception as e:
|
||||
self.app.log.debug("ObjectCollection.on_list_selection_changed() -> Nothing to remove. %s" % str(e))
|
||||
self.app.log.error("ObjectCollection.on_list_selection_changed() -> Nothing to remove. %s" % str(e))
|
||||
|
||||
self.app.setup_default_properties_tab()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user