lib/fmt/RuntimeError: new library

Replacing FormatRuntimeError().
This commit is contained in:
Max Kellermann
2022-11-28 21:58:21 +01:00
parent 45b13fc2a6
commit fa58db798b
105 changed files with 551 additions and 502 deletions

View File

@@ -19,7 +19,7 @@
#include "OptionParser.hxx"
#include "OptionDef.hxx"
#include "util/RuntimeError.hxx"
#include "lib/fmt/RuntimeError.hxx"
#include "util/StringCompare.hxx"
static const char *
@@ -37,7 +37,7 @@ OptionParser::CheckShiftValue(const char *s, const OptionDef &option)
return nullptr;
if (args.empty())
throw FormatRuntimeError("Value expected after %s", s);
throw FmtRuntimeError("Value expected after {}", s);
return Shift(args);
}
@@ -78,7 +78,7 @@ OptionParser::IdentifyOption(const char *s)
}
}
throw FormatRuntimeError("Unknown option: %s", s);
throw FmtRuntimeError("Unknown option: {}", s);
}
OptionParser::Result

View File

@@ -2,6 +2,9 @@ cmdline = static_library(
'cmdline',
'OptionParser.cxx',
include_directories: inc,
dependencies: [
fmt_dep,
],
)
cmdline_dep = declare_dependency(