Commit a7bba93c authored by Timo Koch's avatar Timo Koch
Browse files

Always catch exception by reference. Removes compiler warning.

parent 5644443c
......@@ -179,7 +179,7 @@ public:
deltaX = 0;
try { J.solve(deltaX, b); }
catch (Dune::FMatrixError e)
catch (Dune::FMatrixError& e)
{
/*
std::cout << "error: " << e << "\n";
......
......@@ -382,7 +382,7 @@ int main (int argc, char *argv[]) try
// //////////////////////////////////
// Error handler
// /////////////////////////////////
catch (Dune::Exception e) {
catch (Dune::Exception& e) {
std::cout << e << std::endl;
return 1;
......
......@@ -144,7 +144,7 @@ int main (int argc, char *argv[]) try
// //////////////////////////////////
// Error handler
// /////////////////////////////////
catch (Dune::Exception e) {
catch (Dune::Exception& e) {
std::cout << e << std::endl;
return 1;
......
......@@ -526,14 +526,14 @@ int checkFluidSystem()
try
{
val = FluidSystem::density(fs, paramCache, phaseIdx);
} catch (Dune::Exception e)
} catch (Dune::Exception& e)
{
collectedErrors += "error: FluidSystem::density() throws exception!\n";
}
try
{
val = FluidSystem::molarDensity(fs, paramCache, phaseIdx);
} catch (Dune::Exception e)
} catch (Dune::Exception& e)
{
collectedErrors += "error: FluidSystem::molarDensity() throws exception!\n";
}
......@@ -549,7 +549,7 @@ int checkFluidSystem()
try
{
val = FluidSystem::enthalpy(fs, paramCache, phaseIdx);
} catch (Dune::NotImplemented)
} catch (Dune::NotImplemented&)
{
collectedWarnings += "warning: FluidSystem::enthalpy() is not implemented\n";
} catch (...)
......@@ -594,10 +594,10 @@ int checkFluidSystem()
try
{
val = FluidSystem::diffusionCoefficient(fs, paramCache, phaseIdx, compIdx);
} catch (Dune::NotImplemented)
} catch (Dune::NotImplemented&)
{
collectedWarnings += "warning: FluidSystem::diffusionCoefficient() is not implemented\n";
} catch (Dune::InvalidStateException)
} catch (Dune::InvalidStateException&)
{
collectedWarnings += "warning: FluidSystem::diffusionCoefficient() gives invalid state exception\n";
} catch (...)
......
......@@ -311,7 +311,7 @@ int main (int argc, char *argv[]) try
////////////////////////////////////
// Error handler
////////////////////////////////////
catch (Dune::Exception e) {
catch (Dune::Exception& e) {
std::cout << e << std::endl;
return 1;
}
......
......@@ -133,7 +133,7 @@ int main (int argc, char *argv[]) try
// //////////////////////////////////
// Error handler
// /////////////////////////////////
catch (Dune::Exception e) {
catch (Dune::Exception& e) {
std::cout << e << std::endl;
return 1;
}
......
......@@ -277,7 +277,7 @@ int main (int argc, char *argv[]) try
// //////////////////////////////////
// Error handler
// /////////////////////////////////
catch (Dune::Exception e) {
catch (Dune::Exception& e) {
std::cout << e << std::endl;
return 1;
}
......@@ -170,7 +170,7 @@ int main (int argc, char *argv[]) try
// //////////////////////////////////
// Error handler
// /////////////////////////////////
catch (Dune::Exception e)
catch (Dune::Exception& e)
{
std::cout << e << std::endl;
return 1;
......
Supports Markdown
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