Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
partons
core
elementary-utils
Commits
38fe0bfb
Commit
38fe0bfb
authored
Nov 23, 2016
by
Bryan Berthou
Browse files
refs#16
In ElementaryUtils (trunk) : - In FileUtils correct throw exception in read() method.
parent
2719d01f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ElementaryUtils/file_utils/FileUtils.cpp
View file @
38fe0bfb
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment