diff options
| author | 2023-01-23 07:42:07 +0000 | |
|---|---|---|
| committer | 2023-01-23 13:07:53 +0000 | |
| commit | 5c4badf8ea3ba775854f0d26d3f2e0e119584faa (patch) | |
| tree | 05dd2c5c545f12f71866be6422146477ddd30e3f /src/configparser.cpp | |
| parent | Vendor the fmtlib library. (diff) | |
Replace InspIRCd::Format with fmt::format.
Diffstat (limited to 'src/configparser.cpp')
| -rw-r--r-- | src/configparser.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp index fb70a2513..6dff45588 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -457,10 +457,7 @@ void ParseStack::DoReadFile(const std::string& key, const std::string& name, int auto file = DoOpenFile(path, exec); if (!file) - { - throw CoreException(InspIRCd::Format("Could not read \"%s\" for %s: %s", - path.c_str(), key.c_str(), strerror(errno))); - } + throw CoreException(INSP_FORMAT("Could not read \"{}\" for {}: {}", path, key, strerror(errno))); file_cache& cache = FilesOutput[key]; cache.clear(); @@ -530,8 +527,7 @@ bool ParseStack::ParseFile(const std::string& path, int flags, const std::string if (flags & FLAG_MISSING_OKAY) return true; - throw CoreException(InspIRCd::Format("Could not read \"%s\" for include: %s", - path.c_str(), strerror(errno))); + throw CoreException(INSP_FORMAT("Could not read \"{}\" for include: {}", path, strerror(errno))); } reading.push_back(path); |
