mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-06 04:37:55 +08:00
Foundation Classes - Inherited Standard_Failure from std::exception (#984)
First patch in iterative renovation of exceptions. - Simplify exception classes to be container of data only. - Removed redundant inclusion of <Standard_Type.hxx> in various header files across the project. - Removed Set methods for failure and its define template. - Removed Raise and Rerise static methods. - Remove Instance and Throw methods - Deprecated getting message with old approach, and moving to what() - Update ErrorHandler to handle only specific list of exceptions.
This commit is contained in:
@@ -39,7 +39,7 @@ const char* BRepTools_Write(const char* theFileStr, void* theShapePtr)
|
||||
}
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return anException.GetMessageString();
|
||||
return anException.what();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ const char* BRepTools_Dump(void* theShapePtr)
|
||||
}
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return anException.GetMessageString();
|
||||
return anException.what();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ const char* BRepTools_DumpLoc(void* theLocationPtr)
|
||||
}
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return anException.GetMessageString();
|
||||
return anException.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _TopoDS_FrozenShape_HeaderFile
|
||||
#define _TopoDS_FrozenShape_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _TopoDS_LockedShape_HeaderFile
|
||||
#define _TopoDS_LockedShape_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _TopoDS_UnCompatibleShapes_HeaderFile
|
||||
#define _TopoDS_UnCompatibleShapes_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _Geom2d_UndefinedDerivative_HeaderFile
|
||||
#define _Geom2d_UndefinedDerivative_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _Geom2d_UndefinedValue_HeaderFile
|
||||
#define _Geom2d_UndefinedValue_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _LProp_BadContinuity_HeaderFile
|
||||
#define _LProp_BadContinuity_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _LProp_NotDefined_HeaderFile
|
||||
#define _LProp_NotDefined_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _GProp_UndefinedAxis_HeaderFile
|
||||
#define _GProp_UndefinedAxis_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _Geom_UndefinedDerivative_HeaderFile
|
||||
#define _Geom_UndefinedDerivative_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#ifndef _Geom_UndefinedValue_HeaderFile
|
||||
#define _Geom_UndefinedValue_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#define _Extrema_GCurveLocator_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ const char* GeomTools_Dump(void* theHandlePtr)
|
||||
}
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return anException.GetMessageString();
|
||||
return anException.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user