Changed all catch types to references for polymorphic exceptions.
This commit is contained in:
@@ -118,7 +118,7 @@ void ToroidPy::setMajorRadius(Py::Float arg)
|
||||
(getGeomToroidPtr()->handle());
|
||||
torus->SetMajorRadius((double)arg);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
throw Py::RuntimeError("Major radius must be positive and higher than minor radius");
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ void ToroidPy::setMinorRadius(Py::Float arg)
|
||||
(getGeomToroidPtr()->handle());
|
||||
torus->SetMinorRadius((double)arg);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
throw Py::RuntimeError("Minor radius must be positive and lower than major radius");
|
||||
}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ void ToroidPy::setAxis(Py::Object arg)
|
||||
axis.SetDirection(gp_Dir(dir_x, dir_y, dir_z));
|
||||
this_surf->SetAxis(axis);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
throw Py::RuntimeError("cannot set axis");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user