diff --git a/src/storm/settings/Argument.cpp b/src/storm/settings/Argument.cpp index 555bcdb9d..7e2d64c0b 100644 --- a/src/storm/settings/Argument.cpp +++ b/src/storm/settings/Argument.cpp @@ -171,20 +171,28 @@ namespace storm { out << std::setw(0) << std::left << "<" << this->getName() << ">"; if (!this->validators.empty() || this->hasDefaultValue) { out << " ("; + bool previousEntry = false; + if (this->getIsOptional()) { + out << "optional"; + previousEntry = true; + } if (!this->validators.empty()) { + if (previousEntry) { + out << "; "; + } for (uint64_t i = 0; i < this->validators.size(); ++i) { out << this->validators[i]->toString(); if (i + 1 < this->validators.size()) { out << ", "; } } - - if (this->hasDefaultValue) { - out << "; "; - } + previousEntry = true; } if (this->hasDefaultValue) { + if (previousEntry) { + out << "; "; + } out << "default: "; printValue(out, defaultValue); } diff --git a/src/storm/settings/SettingsManager.cpp b/src/storm/settings/SettingsManager.cpp index 7088f924e..058d92d99 100644 --- a/src/storm/settings/SettingsManager.cpp +++ b/src/storm/settings/SettingsManager.cpp @@ -491,7 +491,7 @@ namespace storm { // In case there are optional arguments that were not set, we set them to their default value. for (uint_fast64_t i = argumentCache.size(); i < option->getArgumentCount(); ++i) { ArgumentBase& argument = option->getArgument(i); - STORM_LOG_THROW(argument.getHasDefaultValue() || argument.getIsOptional(), storm::exceptions::OptionParserException, "Non-optional argument <" << argument.getName() << "> of option:\n" << *option); + STORM_LOG_THROW(argument.getIsOptional(), storm::exceptions::OptionParserException, "Non-optional argument <" << argument.getName() << "> of option:\n" << *option); argument.setFromDefaultValue(); }