prepare for PyCXX 7.0

This commit is contained in:
wmayer
2018-04-18 19:20:50 +02:00
parent c4aaef4033
commit 840c9e8b3c
36 changed files with 226 additions and 239 deletions

View File

@@ -613,7 +613,7 @@ void VectorPy::setLength(Py::Float arg)
VectorPy::PointerType ptr = reinterpret_cast<VectorPy::PointerType>(_pcTwinPointer);
double len = ptr->Length();
if (len < 1.0e-6) {
throw Py::Exception(std::string("Cannot set length of null vector"));
throw Py::RuntimeError(std::string("Cannot set length of null vector"));
}
double val = (double)arg/len;