utils: readCompleteFile(): Fix error string which is too generic without context
这个提交包含在:
父节点
b5b2a42839
当前提交
5f83981d68
@ -136,11 +136,10 @@ std::string utils::getenv(const std::string &key)
|
|||||||
|
|
||||||
std::string utils::readCompleteFile(std::string_view filepath)
|
std::string utils::readCompleteFile(std::string_view filepath)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::fstream stream(std::string{filepath});
|
std::fstream stream(std::string{filepath});
|
||||||
if(!stream.is_open())
|
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;
|
std::stringstream ss;
|
||||||
ss << stream.rdbuf();
|
ss << stream.rdbuf();
|
||||||
|
正在加载...
在新工单中引用
屏蔽一个用户