From: Christian Hofstaedtler Date: Mon, 24 Feb 2014 13:42:52 +0000 (+0100) Subject: REST API: report errors in search-log X-Git-Tag: rec-3.6.0-rc1~166^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1298%2Fhead;p=thirdparty%2Fpdns.git REST API: report errors in search-log --- diff --git a/pdns/ws-api.cc b/pdns/ws-api.cc index 7fe9590735..c6c062facc 100644 --- a/pdns/ws-api.cc +++ b/pdns/ws-api.cc @@ -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 fp(ptr, fclose);