diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx index e8c1d9c9d..b8a2a0d64 100644 --- a/src/archive/plugins/Iso9660ArchivePlugin.cxx +++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx @@ -31,7 +31,7 @@ struct Iso9660 { explicit Iso9660(Path path) :iso(iso9660_open(path.c_str())) { if (iso == nullptr) - throw FmtRuntimeError("Failed to open ISO9660 file {}", + throw FmtRuntimeError("Failed to open ISO9660 file {:?}", path); } @@ -223,7 +223,7 @@ Iso9660ArchiveFile::OpenStream(const char *pathname, { auto statbuf = iso9660_ifs_stat_translate(iso->iso, pathname); if (statbuf == nullptr) - throw FmtRuntimeError("not found in the ISO file: {}", + throw FmtRuntimeError("not found in the ISO file: {:?}", pathname); const lsn_t lsn = statbuf->lsn; diff --git a/src/config/File.cxx b/src/config/File.cxx index 20bc08a3d..d3fb6846f 100644 --- a/src/config/File.cxx +++ b/src/config/File.cxx @@ -211,7 +211,7 @@ ReadConfigFile(ConfigData &config_data, BufferedReader &reader, Path directory) ReadConfigBlock(config_data, reader, name, bo, tokenizer); } else { - throw FmtRuntimeError("unrecognized parameter: {}", + throw FmtRuntimeError("unrecognized parameter: {:?}", name); } } @@ -222,7 +222,7 @@ ReadConfigFile(ConfigData &config_data, Path path) { assert(!path.IsNull()); - FmtDebug(config_file_domain, "loading file {}", path); + FmtDebug(config_file_domain, "loading file {:?}", path); FileReader file(path); @@ -231,7 +231,7 @@ ReadConfigFile(ConfigData &config_data, Path path) try { ReadConfigFile(config_data, reader, path.GetDirectoryName()); } catch (...) { - std::throw_with_nested(FmtRuntimeError("Error in {} line {}", + std::throw_with_nested(FmtRuntimeError("Error in {:?} line {}", path, reader.GetLineNumber())); } diff --git a/src/config/Path.cxx b/src/config/Path.cxx index a10439ba9..b1377dc44 100644 --- a/src/config/Path.cxx +++ b/src/config/Path.cxx @@ -24,7 +24,7 @@ GetHome(const char *user) { AllocatedPath result = GetHomeDir(user); if (result.IsNull()) - throw FmtRuntimeError("no such user: {}", user); + throw FmtRuntimeError("no such user: {:?}", user); return result; } @@ -91,7 +91,7 @@ ParsePath(const char *path) / AllocatedPath::FromUTF8Throw(rest); } } else if (!PathTraitsUTF8::IsAbsolute(path)) { - throw FmtRuntimeError("not an absolute path: {}", path); + throw FmtRuntimeError("not an absolute path: {:?}", path); } else { #endif return AllocatedPath::FromUTF8Throw(path); diff --git a/src/decoder/Thread.cxx b/src/decoder/Thread.cxx index 29d30c49f..5f11e7346 100644 --- a/src/decoder/Thread.cxx +++ b/src/decoder/Thread.cxx @@ -439,7 +439,7 @@ try { if (!allocated.empty()) error_uri = allocated.c_str(); - std::throw_with_nested(FmtRuntimeError("Failed to decode {}", + std::throw_with_nested(FmtRuntimeError("Failed to decode {:?}", error_uri)); }