use specialized exception classes

This commit is contained in:
wmayer
2017-04-28 18:49:11 +02:00
parent 0a32b91b6b
commit 1673ab801e
60 changed files with 675 additions and 349 deletions

View File

@@ -1654,7 +1654,7 @@ void MeshObject::addSegment(const std::vector<unsigned long>& inds)
unsigned long maxIndex = _kernel.CountFacets();
for (std::vector<unsigned long>::const_iterator it = inds.begin(); it != inds.end(); ++it) {
if (*it >= maxIndex)
throw Base::Exception("Index out of range");
throw Base::IndexError("Index out of range");
}
this->_segments.push_back(Segment(this,inds,true));