From e291c5b4df3990bd5ac027d9e1a413b7bad62408 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 13 May 2020 16:03:22 -0600 Subject: [PATCH] Print an error message if no input is given. --- examples/step-50/step-50.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.5