lib/fmt/RuntimeError: new library

Replacing FormatRuntimeError().
This commit is contained in:
Max Kellermann
2022-11-28 21:58:21 +01:00
parent 45b13fc2a6
commit fa58db798b
105 changed files with 551 additions and 502 deletions

View File

@@ -18,7 +18,7 @@
*/
#include "Error.hxx"
#include "util/RuntimeError.hxx"
#include "lib/fmt/RuntimeError.hxx"
extern "C" {
#include <libavutil/error.h>
@@ -37,5 +37,5 @@ MakeFfmpegError(int errnum, const char *prefix)
{
char msg[256];
av_strerror(errnum, msg, sizeof(msg));
return FormatRuntimeError("%s: %s", prefix, msg);
return FmtRuntimeError("{}: {}", prefix, msg);
}

View File

@@ -21,7 +21,7 @@
#include "ChannelLayout.hxx"
#include "SampleFormat.hxx"
#include "pcm/AudioFormat.hxx"
#include "util/RuntimeError.hxx"
#include "lib/fmt/RuntimeError.hxx"
#include <cinttypes>
@@ -34,7 +34,7 @@ RequireFilterByName(const char *name)
{
const auto *filter = avfilter_get_by_name(name);
if (filter == nullptr)
throw FormatRuntimeError("No such FFmpeg filter: '%s'", name);
throw FmtRuntimeError("No such FFmpeg filter: '{}'", name);
return *filter;
}