Replace Base::Exception with appropriate subclass
This commit is contained in:
@@ -224,7 +224,7 @@ double DrawProjGroup::calculateAutomaticScale() const
|
||||
{
|
||||
TechDraw::DrawPage *page = getPage();
|
||||
if (page == NULL)
|
||||
throw Base::Exception("No page is assigned to this feature");
|
||||
throw Base::RuntimeError("No page is assigned to this feature");
|
||||
|
||||
DrawProjGroupItem *viewPtrs[10];
|
||||
|
||||
@@ -404,7 +404,7 @@ int DrawProjGroup::removeProjection(const char *viewProjType)
|
||||
// TODO: shouldn't be able to delete "Front" unless deleting whole group
|
||||
if ( checkViewProjType(viewProjType) ) {
|
||||
if( !hasProjection(viewProjType) ) {
|
||||
throw Base::Exception("The projection doesn't exist in the group");
|
||||
throw Base::RuntimeError("The projection doesn't exist in the group");
|
||||
}
|
||||
|
||||
// Iterate through the child views and find the projection type
|
||||
@@ -676,10 +676,10 @@ int DrawProjGroup::getViewIndex(const char *viewTypeCStr) const
|
||||
} else if (strcmp(viewTypeCStr, "FrontBottomRight") == 0) {
|
||||
result = thirdAngle ? 9 : 0;
|
||||
} else {
|
||||
throw Base::Exception("Unknown view type in DrawProjGroup::getViewIndex()");
|
||||
throw Base::TypeError("Unknown view type in DrawProjGroup::getViewIndex()");
|
||||
}
|
||||
} else {
|
||||
throw Base::Exception("Unknown Projection convention in DrawProjGroup::getViewIndex()");
|
||||
throw Base::ValueError("Unknown Projection convention in DrawProjGroup::getViewIndex()");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -736,12 +736,12 @@ void DrawProjGroup::arrangeViewPointers(DrawProjGroupItem *viewPtrs[10]) const
|
||||
} else if (strcmp(viewTypeCStr, "FrontBottomRight") == 0) {
|
||||
viewPtrs[thirdAngle ? 9 : 0] = oView;
|
||||
} else {
|
||||
throw Base::Exception("Unknown view type in DrawProjGroup::arrangeViewPointers()");
|
||||
throw Base::TypeError("Unknown view type in DrawProjGroup::arrangeViewPointers()");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw Base::Exception("Unknown view type in DrawProjGroup::arrangeViewPointers()");
|
||||
throw Base::ValueError("Unknown view type in DrawProjGroup::arrangeViewPointers()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user