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.2.0-rc2~7^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e291c5b4df3990bd5ac027d9e1a413b7bad62408;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;