From 16f33d8bcad2acc1c72ae1870ace9e4a0fe9dfcc Mon Sep 17 00:00:00 2001 From: gereon Date: Fri, 17 May 2013 17:01:09 +0200 Subject: [PATCH] Changed error messages for stat() and open() --- src/parser/Parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser/Parser.cpp b/src/parser/Parser.cpp index 3a824dd58..cef51c7dd 100644 --- a/src/parser/Parser.cpp +++ b/src/parser/Parser.cpp @@ -76,14 +76,14 @@ storm::parser::MappedFile::MappedFile(const char* filename) { #else if (stat64(filename, &(this->st)) != 0) { #endif - LOG4CPLUS_ERROR(logger, "Error in stat(" << filename << "): " << std::strerror(errno)); - throw exceptions::FileIoException() << "storm::parser::MappedFile Error in stat(): " << std::strerror(errno); + LOG4CPLUS_ERROR(logger, "Error in stat(" << filename << "): Probably, this file does not exist."); + throw exceptions::FileIoException() << "storm::parser::MappedFile Error in stat(): Probably, this file does not exist."; } this->file = open(filename, O_RDONLY); if (this->file < 0) { - LOG4CPLUS_ERROR(logger, "Error in open(" << filename << "): " << std::strerror(errno)); - throw exceptions::FileIoException() << "storm::parser::MappedFile Error in open(): " << std::strerror(errno); + LOG4CPLUS_ERROR(logger, "Error in open(" << filename << "): Probably, we may not read this file."); + throw exceptions::FileIoException() << "storm::parser::MappedFile Error in open(): Probably, we may not read this file."; } this->data = reinterpret_cast(mmap(NULL, this->st.st_size, PROT_READ, MAP_PRIVATE, this->file, 0));