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 88fae2d96e
commit bddca5d68a

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'])