Skip to content
Snippets Groups Projects
Commit e5407289 authored by Patrick Jaap's avatar Patrick Jaap
Browse files

Merge branch 'fix/exception-handling' into 'master'

Some improvements on exception handling

See merge request !74
parents ee54179d aa3ea106
No related branches found
No related tags found
1 merge request!74Some improvements on exception handling
Pipeline #51466 passed
...@@ -77,7 +77,7 @@ energy(const LocalView& localView, ...@@ -77,7 +77,7 @@ energy(const LocalView& localView,
energy = localEnergy_->energy(localView,localAConfiguration); energy = localEnergy_->energy(localView,localAConfiguration);
} catch (Dune::Exception &e) { } catch (Dune::Exception &e) {
trace_off(); trace_off();
throw e; throw;
} }
energy >>= pureEnergy; energy >>= pureEnergy;
......
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
field_type detF = gradient.determinant(); field_type detF = gradient.determinant();
if (detF < 0) if (detF < 0)
DUNE_THROW( Dune::Exception, "det(F) < 0, so it is not possible to calculate the MooneyRivlinEnergy."); DUNE_THROW( Dune::MathError, "det(F) < 0, so it is not possible to calculate the MooneyRivlinEnergy.");
// Add the local energy density // Add the local energy density
field_type strainEnergy = 0; field_type strainEnergy = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment