From: Wolfgang Bangerth Date: Wed, 13 May 2020 22:03:22 +0000 (-0600) Subject: Print an error message if no input is given. X-Git-Tag: v9.3.0-rc1~1634^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=462745cec85a3c46606967cf4c0cce13d20e2b0a;p=dealii.git Print an error message if no input is given. --- diff --git a/examples/step-50/step-50.cc b/examples/step-50/step-50.cc index cbd9564731..4ff41e7bff 100644 --- a/examples/step-50/step-50.cc +++ b/examples/step-50/step-50.cc @@ -327,7 +327,12 @@ bool Settings::try_parse(const std::string &prm_filename) if (prm_filename.size() == 0) { - /* No .prm file provided? Print the default values and exit. */ + std::cout << "**** Error: No input file provided!\n" + << "**** Error: Call this program as './step-50 input.prm\n" + << "\n" + << "**** You may want to use one of the input files in this\n" + << "**** directory, or use the following default values\n" + << "**** to create an input file:\n"; if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0) prm.print_parameters(std::cout, ParameterHandler::Text); return false;