1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0026937: Eliminate NO_CXX_EXCEPTION macro support

Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
This commit is contained in:
ski
2017-02-02 16:35:21 +03:00
committed by apn
parent 0c63f2f8b9
commit 9775fa6110
1146 changed files with 4860 additions and 6183 deletions

View File

@@ -131,7 +131,7 @@ void Storage_RootData::UpdateRoot(const TCollection_AsciiString& aName,const Han
myObjects.ChangeFind(aName)->SetObject(aPers);
}
else {
Standard_NoSuchObject::Raise();
throw Standard_NoSuchObject();
}
}

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Storage_StreamExtCharParityError, Storage_StreamReadError
#if !defined No_Exception && !defined No_Storage_StreamExtCharParityError
#define Storage_StreamExtCharParityError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Storage_StreamExtCharParityError::Raise(MESSAGE);
if (CONDITION) throw Storage_StreamExtCharParityError(MESSAGE);
#else
#define Storage_StreamExtCharParityError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Storage_StreamFormatError, Standard_Failure)
#if !defined No_Exception && !defined No_Storage_StreamFormatError
#define Storage_StreamFormatError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Storage_StreamFormatError::Raise(MESSAGE);
if (CONDITION) throw Storage_StreamFormatError(MESSAGE);
#else
#define Storage_StreamFormatError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Storage_StreamModeError, Standard_Failure)
#if !defined No_Exception && !defined No_Storage_StreamModeError
#define Storage_StreamModeError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Storage_StreamModeError::Raise(MESSAGE);
if (CONDITION) throw Storage_StreamModeError(MESSAGE);
#else
#define Storage_StreamModeError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Storage_StreamReadError, Standard_Failure)
#if !defined No_Exception && !defined No_Storage_StreamReadError
#define Storage_StreamReadError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Storage_StreamReadError::Raise(MESSAGE);
if (CONDITION) throw Storage_StreamReadError(MESSAGE);
#else
#define Storage_StreamReadError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Storage_StreamTypeMismatchError, Storage_StreamReadError)
#if !defined No_Exception && !defined No_Storage_StreamTypeMismatchError
#define Storage_StreamTypeMismatchError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Storage_StreamTypeMismatchError::Raise(MESSAGE);
if (CONDITION) throw Storage_StreamTypeMismatchError(MESSAGE);
#else
#define Storage_StreamTypeMismatchError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Storage_StreamUnknownTypeError, Storage_StreamReadError)
#if !defined No_Exception && !defined No_Storage_StreamUnknownTypeError
#define Storage_StreamUnknownTypeError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Storage_StreamUnknownTypeError::Raise(MESSAGE);
if (CONDITION) throw Storage_StreamUnknownTypeError(MESSAGE);
#else
#define Storage_StreamUnknownTypeError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Storage_StreamWriteError, Standard_Failure)
#if !defined No_Exception && !defined No_Storage_StreamWriteError
#define Storage_StreamWriteError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Storage_StreamWriteError::Raise(MESSAGE);
if (CONDITION) throw Storage_StreamWriteError(MESSAGE);
#else
#define Storage_StreamWriteError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -111,7 +111,7 @@ TCollection_AsciiString Storage_TypeData::Type(const Standard_Integer aTypeNum)
r = myPt.FindKey(aTypeNum);
}
else {
Standard_NoSuchObject::Raise("Storage_TypeData::Type - aTypeNum not in range");
throw Standard_NoSuchObject("Storage_TypeData::Type - aTypeNum not in range");
}
return r;
@@ -125,7 +125,7 @@ Standard_Integer Storage_TypeData::Type(const TCollection_AsciiString& aTypeName
r = myPt.FindFromKey(aTypeName);
}
else {
Standard_NoSuchObject::Raise("Storage_TypeData::Type - aTypeName not found");
throw Standard_NoSuchObject("Storage_TypeData::Type - aTypeName not found");
}
return r;