print usage message if the input case cannot be found

This commit is contained in:
Andreas Lauser 2018-08-17 11:33:28 +02:00
parent 31280d579b
commit 8e9b43fdce

View File

@ -130,7 +130,14 @@ int main(int argc, char** argv)
std::string deckFilename = EWOMS_GET_PARAM(PreTypeTag, std::string, EclDeckFileName);
typedef typename GET_PROP_TYPE(PreTypeTag, Vanguard) PreVanguard;
deckFilename = PreVanguard::canonicalDeckPath(deckFilename).string();
try {
deckFilename = PreVanguard::canonicalDeckPath(deckFilename).string();
}
catch (const std::exception& e) {
Ewoms::Parameters::printUsage<PreTypeTag>(PreProblem::helpPreamble(argc, const_cast<const char**>(argv)),
e.what());
return 1;
}
// Create Deck and EclipseState.
try {