Commit 38fe0bfb authored by Bryan Berthou's avatar Bryan Berthou
Browse files

refs#16

In ElementaryUtils (trunk) :
- In FileUtils correct throw exception in read() method.
parent 2719d01f
......@@ -4,6 +4,7 @@
#include <sstream>
#include "../../../include/ElementaryUtils/logger/CustomException.h"
#include "../../../include/ElementaryUtils/string_utils/Formatter.h"
#include "../../../include/ElementaryUtils/string_utils/StringUtils.h"
namespace ElemUtils {
......@@ -45,10 +46,8 @@ std::string FileUtils::read(const std::string & filePath) {
// manipulations du buffer...
str = buffer.str();
} else {
std::stringstream sstring;
sstring << "(FileUtils::read) Could not read file : " << filePath;
// throw std::runtime_error(sstring.str());
throw CustomException("FileUtils", __func__, sstring.str());
throw CustomException("FileUtils", __func__,
ElemUtils::Formatter() << "Could not read file : " << filePath);
}
return str;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment