1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Added a more verbose error message to the constructor of the BufferedFile class.

This commit is contained in:
Nedeljko Stefanovic
2025-06-06 12:54:49 +00:00
committed by Leonid Fedorov
parent 817b092a2b
commit ddfbeb192f
3 changed files with 85 additions and 1 deletions

View File

@ -31,10 +31,13 @@ BufferedFile::BufferedFile(const char* fname, const char* mode, unsigned opts)
: IDBDataFile(fname), m_fp(0), m_buffer(0)
{
m_fp = fopen(fname, mode);
int err = errno;
if (m_fp == NULL)
{
throw std::runtime_error("unable to open Buffered file ");
static string message = "unable to open file: ";
throw std::runtime_error(message + fname + ", exception: " + strerror(err));
}
applyOptions(opts);