decoder/Thread, ...: quote log strings

This commit is contained in:
Max Kellermann 2024-07-10 15:40:03 +02:00
parent 8861279add
commit a196d1ddf2
4 changed files with 8 additions and 8 deletions

View File

@ -31,7 +31,7 @@ struct Iso9660 {
explicit Iso9660(Path path) explicit Iso9660(Path path)
:iso(iso9660_open(path.c_str())) { :iso(iso9660_open(path.c_str())) {
if (iso == nullptr) if (iso == nullptr)
throw FmtRuntimeError("Failed to open ISO9660 file {}", throw FmtRuntimeError("Failed to open ISO9660 file {:?}",
path); path);
} }
@ -223,7 +223,7 @@ Iso9660ArchiveFile::OpenStream(const char *pathname,
{ {
auto statbuf = iso9660_ifs_stat_translate(iso->iso, pathname); auto statbuf = iso9660_ifs_stat_translate(iso->iso, pathname);
if (statbuf == nullptr) if (statbuf == nullptr)
throw FmtRuntimeError("not found in the ISO file: {}", throw FmtRuntimeError("not found in the ISO file: {:?}",
pathname); pathname);
const lsn_t lsn = statbuf->lsn; const lsn_t lsn = statbuf->lsn;

View File

@ -211,7 +211,7 @@ ReadConfigFile(ConfigData &config_data, BufferedReader &reader, Path directory)
ReadConfigBlock(config_data, reader, name, bo, ReadConfigBlock(config_data, reader, name, bo,
tokenizer); tokenizer);
} else { } else {
throw FmtRuntimeError("unrecognized parameter: {}", throw FmtRuntimeError("unrecognized parameter: {:?}",
name); name);
} }
} }
@ -222,7 +222,7 @@ ReadConfigFile(ConfigData &config_data, Path path)
{ {
assert(!path.IsNull()); assert(!path.IsNull());
FmtDebug(config_file_domain, "loading file {}", path); FmtDebug(config_file_domain, "loading file {:?}", path);
FileReader file(path); FileReader file(path);
@ -231,7 +231,7 @@ ReadConfigFile(ConfigData &config_data, Path path)
try { try {
ReadConfigFile(config_data, reader, path.GetDirectoryName()); ReadConfigFile(config_data, reader, path.GetDirectoryName());
} catch (...) { } catch (...) {
std::throw_with_nested(FmtRuntimeError("Error in {} line {}", std::throw_with_nested(FmtRuntimeError("Error in {:?} line {}",
path, path,
reader.GetLineNumber())); reader.GetLineNumber()));
} }

View File

@ -24,7 +24,7 @@ GetHome(const char *user)
{ {
AllocatedPath result = GetHomeDir(user); AllocatedPath result = GetHomeDir(user);
if (result.IsNull()) if (result.IsNull())
throw FmtRuntimeError("no such user: {}", user); throw FmtRuntimeError("no such user: {:?}", user);
return result; return result;
} }
@ -91,7 +91,7 @@ ParsePath(const char *path)
/ AllocatedPath::FromUTF8Throw(rest); / AllocatedPath::FromUTF8Throw(rest);
} }
} else if (!PathTraitsUTF8::IsAbsolute(path)) { } else if (!PathTraitsUTF8::IsAbsolute(path)) {
throw FmtRuntimeError("not an absolute path: {}", path); throw FmtRuntimeError("not an absolute path: {:?}", path);
} else { } else {
#endif #endif
return AllocatedPath::FromUTF8Throw(path); return AllocatedPath::FromUTF8Throw(path);

View File

@ -439,7 +439,7 @@ try {
if (!allocated.empty()) if (!allocated.empty())
error_uri = allocated.c_str(); error_uri = allocated.c_str();
std::throw_with_nested(FmtRuntimeError("Failed to decode {}", std::throw_with_nested(FmtRuntimeError("Failed to decode {:?}",
error_uri)); error_uri));
} }