From 6825bb9a306dedf55165433c490f3a8d84984970 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Mon, 24 Feb 2014 14:42:52 +0100 Subject: [PATCH] REST API: report errors in search-log --- pdns/ws-api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2