Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
Kea
Commits
15b60127
Commit
15b60127
authored
May 19, 2014
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[3400] Coding style fixes, better error message.
parent
dcd45b54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/lib/cc/data.cc
src/lib/cc/data.cc
+5
-4
No files found.
src/lib/cc/data.cc
View file @
15b60127
...
...
@@ -619,7 +619,7 @@ Element::fromJSON(std::istream& in, bool preproc) throw(JSONError) {
preprocess
(
in
,
filtered
);
}
ElementPtr
value
=
fromJSON
(
preproc
?
filtered
:
in
,
"<istream>"
,
line
,
pos
);
ElementPtr
value
=
fromJSON
(
preproc
?
filtered
:
in
,
"<istream>"
,
line
,
pos
);
return
(
value
);
}
...
...
@@ -633,7 +633,7 @@ Element::fromJSON(std::istream& in, const std::string& file_name, bool preproc)
if
(
preproc
)
{
preprocess
(
in
,
filtered
);
}
return
(
fromJSON
(
preproc
?
filtered
:
in
,
file_name
,
line
,
pos
));
return
(
fromJSON
(
preproc
?
filtered
:
in
,
file_name
,
line
,
pos
));
}
ElementPtr
...
...
@@ -720,7 +720,7 @@ Element::fromJSON(const std::string& in, bool preproc) {
if
(
preproc
)
{
preprocess
(
ss
,
filtered
);
}
ElementPtr
result
(
fromJSON
(
preproc
?
filtered
:
ss
,
"<string>"
,
line
,
pos
));
ElementPtr
result
(
fromJSON
(
preproc
?
filtered
:
ss
,
"<string>"
,
line
,
pos
));
skipChars
(
ss
,
WHITESPACE
,
line
,
pos
);
// ss must now be at end
if
(
ss
.
peek
()
!=
EOF
)
{
...
...
@@ -735,8 +735,9 @@ Element::fromJSONFile(const std::string& file_name,
std
::
ifstream
infile
(
file_name
.
c_str
(),
std
::
ios
::
in
|
std
::
ios
::
binary
);
if
(
!
infile
.
is_open
())
{
const
char
*
error
=
strerror
(
errno
);
isc_throw
(
InvalidOperation
,
"Failed to read file "
<<
file_name
<<
",error:"
<<
err
n
o
);
<<
",error:"
<<
erro
r
);
}
return
(
fromJSON
(
infile
,
file_name
,
preproc
));
...
...
Write
Preview
Markdown
is supported
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