mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-12 15:39:09 +00:00
Report filename in exception.
This commit is contained in:
parent
e44619707e
commit
eab0b577f8
2
posix.cc
2
posix.cc
@ -73,7 +73,7 @@ fmt::BufferedFile::~BufferedFile() FMT_NOEXCEPT(true) {
|
|||||||
fmt::BufferedFile::BufferedFile(fmt::StringRef filename, fmt::StringRef mode) {
|
fmt::BufferedFile::BufferedFile(fmt::StringRef filename, fmt::StringRef mode) {
|
||||||
FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), 0);
|
FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), 0);
|
||||||
if (!file_)
|
if (!file_)
|
||||||
throw SystemError(errno, "cannot open file");
|
throw SystemError(errno, "cannot open file {}", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fmt::BufferedFile::close() {
|
void fmt::BufferedFile::close() {
|
||||||
|
Loading…
Reference in New Issue
Block a user