From 5f83981d680ea0eb8609c48e389cfa0ab4c7a0a5 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 3 Apr 2022 11:07:26 +0200 Subject: [PATCH] utils: readCompleteFile(): Fix error string which is too generic without context --- utils.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils.cpp b/utils.cpp index 8201c43..0193b6c 100644 --- a/utils.cpp +++ b/utils.cpp @@ -136,11 +136,10 @@ std::string utils::getenv(const std::string &key) std::string utils::readCompleteFile(std::string_view filepath) { - std::fstream stream(std::string{filepath}); if(!stream.is_open()) { - throw std::runtime_error("stream is not open"); + throw std::runtime_error("utils::readCompleteFile(): stream is not open"); } std::stringstream ss; ss << stream.rdbuf();