mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00
Made too broad exception handling more specific
This commit is contained in:
parent
a2e2c541e5
commit
24474b4434
@ -386,7 +386,7 @@ class SimulationView(CuraView):
|
|||||||
self._max_thickness = max(float(p.lineThicknesses.max()), self._max_thickness)
|
self._max_thickness = max(float(p.lineThicknesses.max()), self._max_thickness)
|
||||||
try:
|
try:
|
||||||
self._min_thickness = min(float(p.lineThicknesses[numpy.nonzero(p.lineThicknesses)].min()), self._min_thickness)
|
self._min_thickness = min(float(p.lineThicknesses[numpy.nonzero(p.lineThicknesses)].min()), self._min_thickness)
|
||||||
except:
|
except ValueError:
|
||||||
# Sometimes, when importing a GCode the line thicknesses are zero and so the minimum (avoiding
|
# Sometimes, when importing a GCode the line thicknesses are zero and so the minimum (avoiding
|
||||||
# the zero) can't be calculated
|
# the zero) can't be calculated
|
||||||
Logger.log("i", "Min thickness can't be calculated because all the values are zero")
|
Logger.log("i", "Min thickness can't be calculated because all the values are zero")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user