Commit baa70926 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[master] report actual error in masterload

if file cannot be opened.

acked on jabber by jinmei
parent 3777aeda
......@@ -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();
......
Markdown is supported
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