projects
/
platform
/
core
/
security
/
security-manager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bea9e38
)
Throw exception on failed config file read
47/222947/3
author
Konrad Lipinski
<k.lipinski2@samsung.com>
Tue, 21 Jan 2020 11:00:47 +0000
(12:00 +0100)
committer
Tomasz Swierczek
<t.swierczek@samsung.com>
Thu, 23 Jan 2020 06:53:59 +0000
(06:53 +0000)
Change-Id: I8b19bd1863f1df84ef3e10548be644e9632dcb5c
src/common/config-file.cpp
patch
|
blob
|
history
diff --git
a/src/common/config-file.cpp
b/src/common/config-file.cpp
index 96b173e8925b039b5499b6a66c3011b344872e8a..595f2dd4203aa3ab5420a74b6c240a6fb293ce4c 100644
(file)
--- a/
src/common/config-file.cpp
+++ b/
src/common/config-file.cpp
@@
-37,6
+37,8
@@
std::vector<std::vector<std::string>> ConfigFile::read()
{
std::vector<std::vector<std::string>> ret;
std::ifstream stream(m_path);
+ if (stream.fail())
+ ThrowMsg(FS::Exception::FileError, "Error opening file: " << m_path);
std::string line;
while (getline(stream, line)) {