Replace Base::Exception with appropriate subclass

This commit is contained in:
wmayer
2018-11-14 19:45:20 +01:00
parent d7ec2b1368
commit 9aa6a700d8
28 changed files with 273 additions and 196 deletions

View File

@@ -117,16 +117,16 @@ App::DocumentObjectExecReturn *MultiFuse::execute(void)
#if OCC_VERSION_HEX <= 0x060800
TopoDS_Shape resShape = s.front();
if (resShape.IsNull())
throw Base::Exception("Input shape is null");
throw NullShapeException("Input shape is null");
for (std::vector<TopoDS_Shape>::iterator it = s.begin()+1; it != s.end(); ++it) {
if (it->IsNull())
throw Base::Exception("Input shape is null");
throw NullShapeException("Input shape is null");
// Let's call algorithm computing a fuse operation:
BRepAlgoAPI_Fuse mkFuse(resShape, *it);
// Let's check if the fusion has been successful
if (!mkFuse.IsDone())
throw Base::Exception("Fusion failed");
throw BooleanException("Fusion failed");
resShape = mkFuse.Shape();
ShapeHistory hist1 = buildHistory(mkFuse, TopAbs_FACE, resShape, mkFuse.Shape1());
@@ -222,7 +222,7 @@ App::DocumentObjectExecReturn *MultiFuse::execute(void)
}
}
else {
throw Base::Exception("Not enough shape objects linked");
throw Base::CADKernelError("Not enough shape objects linked");
}
return App::DocumentObject::StdReturn;