system/FmtError: new library

Replaces the Format*() functions in system/Error.hxx.
This commit is contained in:
Max Kellermann
2022-11-28 18:49:35 +01:00
parent 124e75c286
commit 96ae659fdf
25 changed files with 305 additions and 186 deletions

View File

@@ -31,7 +31,7 @@
*/
#include "InotifyEvent.hxx"
#include "system/Error.hxx"
#include "system/FmtError.hxx"
#include "io/UniqueFileDescriptor.hxx"
#include <array>
@@ -68,7 +68,7 @@ InotifyEvent::AddWatch(const char *pathname, uint32_t mask)
int wd = inotify_add_watch(event.GetFileDescriptor().Get(),
pathname, mask);
if (wd < 0)
throw FormatErrno("inotify_add_watch('%s') failed", pathname);
throw FmtErrno("inotify_add_watch('{}') failed", pathname);
return wd;
}