From e8c152b78601fc08608fc36826ae7cfdfe5d9b6a Mon Sep 17 00:00:00 2001 From: Philipp Nuske <philipp.nuske@mailbox.org> Date: Tue, 26 Feb 2013 09:29:41 +0000 Subject: [PATCH] improved the error message if sth in the dgf file went wrong reviewed by Bernd git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10270 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/common/start.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dumux/common/start.hh b/dumux/common/start.hh index 5596477882..9e890f147e 100644 --- a/dumux/common/start.hh +++ b/dumux/common/start.hh @@ -499,13 +499,20 @@ int start(int argc, std::cerr << e << ". Abort!\n"; return 1; } + catch (Dune::DGFException & e) { + std::cerr << "DGF exception thrown. " + "Most likely, the DGF file name is wrong " + "or the DGF file is corrupted, " + "e.g. missing hash at end of file or wrong number (dimensions) of entries." << std::endl; + return 2; + } catch (Dune::Exception &e) { std::cerr << "Dune reported error: " << e << std::endl; - return 2; + return 3; } catch (...) { std::cerr << "Unknown exception thrown!\n"; - return 3; + return 4; } } -- GitLab