From 9d80db2793d3df0cc2a96a42b216a1a6503875da Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 14 Nov 2018 17:23:48 +0100 Subject: [PATCH] Replace Base::Exception with appropriate subclass --- src/Mod/Import/App/FeatureImportIges.cpp | 2 +- src/Mod/Import/App/StepShape.cpp | 4 ++-- src/Mod/MeshPart/App/Mesher.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Import/App/FeatureImportIges.cpp b/src/Mod/Import/App/FeatureImportIges.cpp index c3ef7dbb5d..5f922af183 100644 --- a/src/Mod/Import/App/FeatureImportIges.cpp +++ b/src/Mod/Import/App/FeatureImportIges.cpp @@ -85,7 +85,7 @@ Standard_Integer FeatureImportIges::Execute(void) // read iges-file if (aReader.ReadFile((const Standard_CString)FileName.c_str()) != IFSelect_RetDone) - throw Base::Exception("IGES read failed (load file)"); + throw Base::FileException("IGES read failed (load file)"); // check iges-file (memory) //if (!aReader.Check(Standard_True)) diff --git a/src/Mod/Import/App/StepShape.cpp b/src/Mod/Import/App/StepShape.cpp index 14fbe283a3..c05435a3ea 100644 --- a/src/Mod/Import/App/StepShape.cpp +++ b/src/Mod/Import/App/StepShape.cpp @@ -58,11 +58,11 @@ int StepShape::read(const char* fileName) if (!fi.exists()) { std::stringstream str; str << "File '" << fileName << "' does not exist!"; - throw Base::Exception(str.str().c_str()); + throw Base::FileException(str.str().c_str()); } if (aReader.ReadFile((Standard_CString)fileName) != IFSelect_RetDone) { - throw Base::Exception("Cannot open STEP file"); + throw Base::FileException("Cannot open STEP file"); } //Standard_Integer ic = Interface_Static::IVal("read.precision.mode"); diff --git a/src/Mod/MeshPart/App/Mesher.cpp b/src/Mod/MeshPart/App/Mesher.cpp index 00baf3925e..aea372aa61 100644 --- a/src/Mod/MeshPart/App/Mesher.cpp +++ b/src/Mod/MeshPart/App/Mesher.cpp @@ -317,7 +317,7 @@ Mesh::MeshObject* Mesher::createMesh() const } #ifndef HAVE_SMESH - throw Base::Exception("SMESH is not available on this platform"); + throw Base::RuntimeError("SMESH is not available on this platform"); #else std::list hypoth;