*: let libfmt quote strings

This commit is contained in:
Max Kellermann
2024-04-16 11:06:34 +02:00
parent 39c9e92f42
commit 0c1ecc96a8
71 changed files with 160 additions and 160 deletions

View File

@@ -17,7 +17,7 @@ RequireFilterByName(const char *name)
{
const auto *filter = avfilter_get_by_name(name);
if (filter == nullptr)
throw FmtRuntimeError("No such FFmpeg filter: '{}'", name);
throw FmtRuntimeError("No such FFmpeg filter: {:?}", name);
return *filter;
}

View File

@@ -41,7 +41,7 @@ IcuConverter::Create(const char *charset)
UConverter *converter = ucnv_open(charset, &code);
if (converter == nullptr)
throw ICU::MakeError(code,
FmtBuffer<256>(FMT_STRING("Failed to initialize charset '{}'"),
FmtBuffer<256>(FMT_STRING("Failed to initialize charset {:?}"),
charset));
return std::unique_ptr<IcuConverter>(new IcuConverter(converter));
@@ -54,7 +54,7 @@ IcuConverter::Create(const char *charset)
iconv_close(to);
if (from != (iconv_t)-1)
iconv_close(from);
throw FmtErrno(e, FMT_STRING("Failed to initialize charset '{}'"),
throw FmtErrno(e, FMT_STRING("Failed to initialize charset {:?}"),
charset);
}

View File

@@ -12,7 +12,7 @@ Database::Database(const char *path)
int result = sqlite3_open(path, &db);
if (result != SQLITE_OK)
throw SqliteError(db, result,
FmtBuffer<1024>("Failed to open sqlite database '{}'",
FmtBuffer<1024>("Failed to open sqlite database {:?}",
path));
}