1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value

Add missing const& to catch statements.
This commit is contained in:
kgv
2019-03-31 23:38:14 +03:00
parent f996b507d8
commit a738b534ca
106 changed files with 210 additions and 213 deletions

View File

@@ -66,7 +66,7 @@ Storage_Error StdStorage::Read(const TCollection_AsciiString& theFileName,
OCC_CATCH_SIGNALS
PCDM_ReadWriter::Open(*aDriver, theFileName, Storage_VSRead);
}
catch (Standard_Failure)
catch (Standard_Failure const&)
{
return Storage_VSOpenError;
}
@@ -134,7 +134,7 @@ Storage_Error StdStorage::Read(Storage_BaseDriver& theDriver,
theDriver.ReadReferenceType(aRef, aType);
anError = Storage_VSOk;
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
anError = Storage_VSTypeMismatch;
}
@@ -162,9 +162,9 @@ Storage_Error StdStorage::Read(Storage_BaseDriver& theDriver,
aReadData.ReadPersistentObject(i);
anError = Storage_VSOk;
}
catch (Storage_StreamTypeMismatchError) { anError = Storage_VSTypeMismatch; }
catch (Storage_StreamFormatError) { anError = Storage_VSFormatError; }
catch (Storage_StreamReadError) { anError = Storage_VSFormatError; }
catch (Storage_StreamTypeMismatchError const&) { anError = Storage_VSTypeMismatch; }
catch (Storage_StreamFormatError const&) { anError = Storage_VSFormatError; }
catch (Storage_StreamReadError const&) { anError = Storage_VSFormatError; }
if (anError != Storage_VSOk)
return anError;
@@ -311,7 +311,7 @@ Storage_Error StdStorage::Write(Storage_BaseDriver& theDriver,
if (anError != Storage_VSOk)
return anError;
}
catch (Storage_StreamWriteError) {
catch (Storage_StreamWriteError const&) {
return Storage_VSWriteError;
}

View File

@@ -58,13 +58,13 @@ Standard_Boolean StdStorage_HeaderData::Read(Storage_BaseDriver& theDriver)
myDataType,
myUserInfo);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadInfo";
return Standard_False;
}
catch (Storage_StreamExtCharParityError)
catch (Storage_StreamExtCharParityError const&)
{
myErrorStatus = Storage_VSExtCharParityError;
myErrorStatusExt = "ReadInfo";
@@ -91,13 +91,13 @@ Standard_Boolean StdStorage_HeaderData::Read(Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.ReadComment(myComments);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadComment";
return Standard_False;
}
catch (Storage_StreamExtCharParityError)
catch (Storage_StreamExtCharParityError const&)
{
myErrorStatus = Storage_VSExtCharParityError;
myErrorStatusExt = "ReadComment";
@@ -146,13 +146,13 @@ Standard_Boolean StdStorage_HeaderData::Write(Storage_BaseDriver& theDriver)
myDataType,
myUserInfo);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "WriteInfo";
return Standard_False;
}
catch (Storage_StreamExtCharParityError)
catch (Storage_StreamExtCharParityError const&)
{
myErrorStatus = Storage_VSExtCharParityError;
myErrorStatusExt = "WriteInfo";
@@ -179,13 +179,13 @@ Standard_Boolean StdStorage_HeaderData::Write(Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.WriteComment(myComments);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "WriteComment";
return Standard_False;
}
catch (Storage_StreamExtCharParityError)
catch (Storage_StreamExtCharParityError const&)
{
myErrorStatus = Storage_VSExtCharParityError;
myErrorStatusExt = "WriteComment";

View File

@@ -58,7 +58,7 @@ Standard_Boolean StdStorage_RootData::Read(Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.ReadRoot(aRootName, aRef, aTypeName);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadRoot";
@@ -107,7 +107,7 @@ Standard_Boolean StdStorage_RootData::Write(Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.WriteRoot(aRoot->Name(), aRoot->Reference(), aRoot->Type());
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadRoot";

View File

@@ -58,7 +58,7 @@ Standard_Boolean StdStorage_TypeData::Read(Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.ReadTypeInformations (aTypeNum, aTypeName);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadTypeInformations";
@@ -106,7 +106,7 @@ Standard_Boolean StdStorage_TypeData::Write(Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.WriteTypeInformations(i, Type(i));
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "WriteTypeInformations";