FEM: view provider material, use value error instead of bare except

This commit is contained in:
Bernd Hahnebach
2019-07-02 21:24:58 +02:00
parent fd5df98b6a
commit f0df2aa658

View File

@@ -476,7 +476,7 @@ class _TaskPanelFemMaterial:
# PoissonRatio does not have a unit, but it is checked it there is no value at all
try:
float(self.material['PoissonRatio'])
except:
except ValueError:
FreeCAD.Console.PrintMessage(
'PoissonRatio has wrong or no data (reset the value): {}\n'
.format(self.material['PoissonRatio'])