Commit bd248fc0 authored by Mark Olesen's avatar Mark Olesen

STYLE: use const reference for caught exceptions

parent ac46f28a
...@@ -286,12 +286,12 @@ void Foam::vtkPVFoam::convertVolFields ...@@ -286,12 +286,12 @@ void Foam::vtkPVFoam::convertVolFields
// Convert // Convert
convertVolField(patchInterpList, fld); convertVolField(patchInterpList, fld);
} }
catch (Foam::IOerror& ioErr) catch (const Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info<< nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (const Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
...@@ -368,12 +368,12 @@ void Foam::vtkPVFoam::convertDimFields ...@@ -368,12 +368,12 @@ void Foam::vtkPVFoam::convertDimFields
convertVolField(patchInterpList, volFld); convertVolField(patchInterpList, volFld);
} }
catch (Foam::IOerror& ioErr) catch (const Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info<< nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (const Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
...@@ -496,12 +496,12 @@ void Foam::vtkPVFoam::convertAreaFields ...@@ -496,12 +496,12 @@ void Foam::vtkPVFoam::convertAreaFields
dataset->GetCellData()->AddArray(cdata); dataset->GetCellData()->AddArray(cdata);
} }
} }
catch (Foam::IOerror& ioErr) catch (const Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info<< nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (const Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
...@@ -638,12 +638,12 @@ void Foam::vtkPVFoam::convertPointFields ...@@ -638,12 +638,12 @@ void Foam::vtkPVFoam::convertPointFields
dataset->GetPointData()->AddArray(pdata); dataset->GetPointData()->AddArray(pdata);
} }
} }
catch (Foam::IOerror& ioErr) catch (const Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info<< nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (const Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
...@@ -817,12 +817,12 @@ void Foam::vtkPVFoam::convertLagrangianFields ...@@ -817,12 +817,12 @@ void Foam::vtkPVFoam::convertLagrangianFields
vtkmesh->GetCellData()->AddArray(data); vtkmesh->GetCellData()->AddArray(data);
vtkmesh->GetPointData()->AddArray(data); vtkmesh->GetPointData()->AddArray(data);
} }
catch (Foam::IOerror& ioErr) catch (const Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info<< nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (const Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment