From eab0b577f866cd1f61f06e7ebba2b168b6681e5b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 28 Aug 2014 13:42:07 -0700 Subject: [PATCH] Report filename in exception. --- posix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posix.cc b/posix.cc index 8c6134d0..d4091868 100644 --- a/posix.cc +++ b/posix.cc @@ -73,7 +73,7 @@ fmt::BufferedFile::~BufferedFile() FMT_NOEXCEPT(true) { fmt::BufferedFile::BufferedFile(fmt::StringRef filename, fmt::StringRef mode) { FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), 0); if (!file_) - throw SystemError(errno, "cannot open file"); + throw SystemError(errno, "cannot open file {}", path); } void fmt::BufferedFile::close() {