mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 10:08:56 +02:00
ircd::fs: Add derror log msg w/ path on fd open system_error.
This commit is contained in:
parent
d9afb64f40
commit
1720aea7e2
10
ircd/fs.cc
10
ircd/fs.cc
|
@ -1914,6 +1914,7 @@ ircd::fs::fd::fd(const string_view &path)
|
|||
|
||||
ircd::fs::fd::fd(const string_view &path,
|
||||
const opts &opts)
|
||||
try
|
||||
:fdno{[&path, &opts]
|
||||
() -> int
|
||||
{
|
||||
|
@ -1937,6 +1938,15 @@ ircd::fs::fd::fd(const string_view &path,
|
|||
if(opts.ate)
|
||||
syscall(::lseek, fdno, 0, SEEK_END);
|
||||
}
|
||||
catch(const std::system_error &e)
|
||||
{
|
||||
log::derror
|
||||
{
|
||||
log, "`%s' :%s",
|
||||
path,
|
||||
e.what(),
|
||||
};
|
||||
}
|
||||
|
||||
ircd::fs::fd::fd(fd &&o)
|
||||
noexcept
|
||||
|
|
Loading…
Reference in a new issue