]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
REST API: report errors in search-log 1298/head
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Mon, 24 Feb 2014 13:42:52 +0000 (14:42 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Mon, 24 Feb 2014 13:42:52 +0000 (14:42 +0100)
pdns/ws-api.cc

index 7fe9590735184ebfb209a15da28dd9053ccecf03..c6c062facc6c715d5fd9be616fabd33534c274b5 100644 (file)
@@ -145,7 +145,7 @@ static string logGrep(const string& q, const string& fname, const string& prefix
 {
   FILE* ptr = fopen(fname.c_str(), "r");
   if(!ptr) {
-    return "[]";
+    throw ApiException("Opening \"" + fname + "\" failed: " + stringerror());
   }
   boost::shared_ptr<FILE> fp(ptr, fclose);