Improve error message about missing settings.xml

This commit is contained in:
Paul Romano 2023-04-08 14:34:02 +02:00
parent 04b458a7ed
commit 44a57b9a6f

View file

@ -223,16 +223,11 @@ void read_settings_xml()
std::string filename = settings::path_input + "settings.xml";
if (!file_exists(filename)) {
if (run_mode != RunMode::PLOTTING) {
fatal_error(
fmt::format("Settings XML file '{}' does not exist! In order "
"to run OpenMC, you first need a set of input files; at a "
"minimum, this "
"includes settings.xml, geometry.xml, and materials.xml "
"or a single XML file containing all of these files. "
"Please consult "
"the user's guide at https://docs.openmc.org for further "
"information.",
filename));
fatal_error("Could not find any XML input files! In order to run OpenMC, "
"you first need a set of input files; at a minimum, this "
"includes settings.xml, geometry.xml, and materials.xml or a "
"single model XML file. Please consult the user's guide at "
"https://docs.openmc.org for further information.");
} else {
// The settings.xml file is optional if we just want to make a plot.
return;