fixed: catch exception by reference
class is polymorphic
This commit is contained in:
@@ -99,7 +99,7 @@ TEST(TestISTLMatrix, AssembleMPI)
|
||||
|
||||
b = 1.0;
|
||||
op.apply(b, b2);
|
||||
} catch (Dune::ISTLError e) {
|
||||
} catch (Dune::ISTLError& e) {
|
||||
std::cerr << e << std::endl;
|
||||
ASSERT_TRUE(false);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ EvalFunc::EvalFunc (const char* function, const char* x, Real eps)
|
||||
arg[i] = v[i]->GetAddress(x);
|
||||
}
|
||||
}
|
||||
catch (ExprEval::Exception e) {
|
||||
catch (ExprEval::Exception& e) {
|
||||
this->cleanup();
|
||||
ExprException(e,"parsing",function);
|
||||
}
|
||||
@@ -162,7 +162,7 @@ Real EvalFunc::evaluate (const Real& x) const
|
||||
*arg[i] = x;
|
||||
result = expr[i]->Evaluate();
|
||||
}
|
||||
catch (ExprEval::Exception e) {
|
||||
catch (ExprEval::Exception& e) {
|
||||
ExprException(e,"evaluating expression");
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ EvalFunction::EvalFunction (const char* function) : gradient{}, dgradient{}
|
||||
arg[i].t = v[i]->GetAddress("t");
|
||||
}
|
||||
}
|
||||
catch (ExprEval::Exception e) {
|
||||
catch (ExprEval::Exception& e) {
|
||||
this->cleanup();
|
||||
ExprException(e,"parsing",function);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ Real EvalFunction::evaluate (const Vec3& X) const
|
||||
*arg[i].t = Xt ? Xt->t : Real(0);
|
||||
result = expr[i]->Evaluate();
|
||||
}
|
||||
catch (ExprEval::Exception e) {
|
||||
catch (ExprEval::Exception& e) {
|
||||
ExprException(e,"evaluating expression");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user