system/FmtError: new library
Replaces the Format*() functions in system/Error.hxx.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "../AsyncInputStream.hxx"
|
||||
#include "event/Call.hxx"
|
||||
#include "event/Loop.hxx"
|
||||
#include "system/Error.hxx"
|
||||
#include "system/FmtError.hxx"
|
||||
#include "io/Open.hxx"
|
||||
#include "io/UniqueFileDescriptor.hxx"
|
||||
#include "io/uring/ReadOperation.hxx"
|
||||
@@ -188,7 +188,7 @@ OpenUringInputStream(const char *path, Mutex &mutex)
|
||||
// TODO: use IORING_OP_STATX
|
||||
struct stat st;
|
||||
if (fstat(fd.Get(), &st) < 0)
|
||||
throw FormatErrno("Failed to access %s", path);
|
||||
throw FmtErrno("Failed to access {}", path);
|
||||
|
||||
if (!S_ISREG(st.st_mode))
|
||||
throw FormatRuntimeError("Not a regular file: %s", path);
|
||||
|
||||
Reference in New Issue
Block a user