use specialized exception classes

This commit is contained in:
wmayer
2017-04-28 18:49:11 +02:00
parent 998c000516
commit fb7094bf31
60 changed files with 675 additions and 349 deletions

View File

@@ -825,7 +825,7 @@ bool View3DInventor::setCamera(const char* pCamera)
{
SoCamera * CamViewer = _viewer->getSoRenderManager()->getCamera();
if (!CamViewer) {
throw Base::Exception("No camera set so far...");
throw Base::RuntimeError("No camera set so far...");
}
SoInput in;
@@ -835,7 +835,7 @@ bool View3DInventor::setCamera(const char* pCamera)
SoDB::read(&in,Cam);
if (!Cam){
throw Base::Exception("Camera settings failed to read");
throw Base::RuntimeError("Camera settings failed to read");
}
// toggle between persepective and orthographic camera
@@ -862,7 +862,7 @@ bool View3DInventor::setCamera(const char* pCamera)
CamViewerP->farDistance = ((SoPerspectiveCamera *)Cam)->farDistance;
CamViewerP->focalDistance = ((SoPerspectiveCamera *)Cam)->focalDistance;
} else {
throw Base::Exception("Camera type mismatch");
throw Base::TypeError("Camera type mismatch");
}
} else if (Cam->getTypeId() == SoOrthographicCamera::getClassTypeId()) {
if (CamViewerO){
@@ -875,7 +875,7 @@ bool View3DInventor::setCamera(const char* pCamera)
CamViewerO->aspectRatio = ((SoOrthographicCamera *)Cam)->aspectRatio ;
CamViewerO->height = ((SoOrthographicCamera *)Cam)->height;
} else {
throw Base::Exception("Camera type mismatch");
throw Base::TypeError("Camera type mismatch");
}
}