Skip to content
Snippets Groups Projects
Commit c9b60ae7 authored by Timo Koch's avatar Timo Koch
Browse files

Print Parameter list at the very end of the programme if a parameter

exception is caught. 

The parameter list was printed every time a parameter exception was
thrown in the parameter class. This made it impossible to catch
parameter exceptions without having a paramter list output every time.
Now it is printed only if the start function exits with a parameter
error.



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@15229 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 06eb8149
No related branches found
No related tags found
No related merge requests found
...@@ -442,7 +442,6 @@ private: ...@@ -442,7 +442,6 @@ private:
// retrieve actual parameter from the parameter tree // retrieve actual parameter from the parameter tree
if (!Params::tree().hasKey(canonicalName) && !Params::tree().hasKey(paramName)) { if (!Params::tree().hasKey(canonicalName) && !Params::tree().hasKey(paramName)) {
print<TypeTag>();
DUNE_THROW(::Dumux::ParameterException, DUNE_THROW(::Dumux::ParameterException,
"Mandatory parameter '" << canonicalName "Mandatory parameter '" << canonicalName
<< "' was not specified"); << "' was not specified");
......
...@@ -498,6 +498,7 @@ int start(int argc, ...@@ -498,6 +498,7 @@ int start(int argc,
return start_<TypeTag>(argc, argv, usage); return start_<TypeTag>(argc, argv, usage);
} }
catch (Dumux::ParameterException &e) { catch (Dumux::ParameterException &e) {
Dumux::Parameters::print<TypeTag>();
std::cerr << e << ". Abort!\n"; std::cerr << e << ". Abort!\n";
return 1; return 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment