Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
baa70926
Commit
baa70926
authored
Jul 26, 2012
by
Jelte Jansen
Browse files
[master] report actual error in masterload
if file cannot be opened. acked on jabber by jinmei
parent
3777aeda
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/masterload.cc
View file @
baa70926
...
...
@@ -17,6 +17,7 @@
#include
<sstream>
#include
<string>
#include
<cctype>
#include
<cerrno>
#include
<boost/scoped_ptr.hpp>
...
...
@@ -71,7 +72,8 @@ masterLoad(const char* const filename, const Name& origin,
ifstream
ifs
;
ifs
.
open
(
filename
,
ios_base
::
in
);
if
(
ifs
.
fail
())
{
isc_throw
(
MasterLoadError
,
"Failed to open master file: "
<<
filename
);
isc_throw
(
MasterLoadError
,
"Failed to open master file: "
<<
filename
<<
": "
<<
strerror
(
errno
));
}
masterLoad
(
ifs
,
origin
,
zone_class
,
callback
);
ifs
.
close
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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