lib/fmt/RuntimeError: new library
Replacing FormatRuntimeError().
This commit is contained in:
@@ -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
|
||||
|
@@ -2,6 +2,9 @@ cmdline = static_library(
|
||||
'cmdline',
|
||||
'OptionParser.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
],
|
||||
)
|
||||
|
||||
cmdline_dep = declare_dependency(
|
||||
|
Reference in New Issue
Block a user