Changed all catch types to references for polymorphic exceptions.
This commit is contained in:
@@ -150,7 +150,7 @@ void ConicPy::setAxis(Py::Object arg)
|
||||
axis.SetDirection(gp_Dir(val.x, val.y, val.z));
|
||||
conic->SetAxis(axis);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
throw Py::RuntimeError("cannot set axis");
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ void ConicPy::setXAxis(Py::Object arg)
|
||||
pos.SetXDirection(gp_Dir(val.x, val.y, val.z));
|
||||
conic->SetPosition(pos);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
throw Py::RuntimeError("cannot set X axis");
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,7 @@ void ConicPy::setYAxis(Py::Object arg)
|
||||
pos.SetYDirection(gp_Dir(val.x, val.y, val.z));
|
||||
conic->SetPosition(pos);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
throw Py::RuntimeError("cannot set Y axis");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user