From 75fed1d2369306e78c33964627939bf0549a3f13 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Wed, 1 Jan 2020 12:35:17 +0400 Subject: [PATCH] Print error code when failed to open file on Windows --- components/files/lowlevelfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/files/lowlevelfile.cpp b/components/files/lowlevelfile.cpp index aff15777f..424527b9d 100644 --- a/components/files/lowlevelfile.cpp +++ b/components/files/lowlevelfile.cpp @@ -261,7 +261,7 @@ void LowLevelFile::open (char const * filename) if (handle == INVALID_HANDLE_VALUE) { std::ostringstream os; - os << "Failed to open '" << filename << "' for reading."; + os << "Failed to open '" << filename << "' for reading: " << GetLastError(); throw std::runtime_error (os.str ()); }