From: Pieter Lexis Date: Fri, 15 Mar 2019 11:25:21 +0000 (+0100) Subject: GSQLBackend::*Comments: log name and type in error X-Git-Tag: dnsdist-1.4.0-alpha1~53^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31f4737d656e2a3396addcdc736d445be48f1fe7;p=pdns GSQLBackend::*Comments: log name and type in error --- diff --git a/pdns/backends/gsql/gsqlbackend.cc b/pdns/backends/gsql/gsqlbackend.cc index 4a10c560d..e8d111c27 100644 --- a/pdns/backends/gsql/gsqlbackend.cc +++ b/pdns/backends/gsql/gsqlbackend.cc @@ -1504,7 +1504,7 @@ bool GSQLBackend::listComments(const uint32_t domain_id) execute(); } catch(SSqlException &e) { - throw PDNSException("GSQLBackend list comments query: "+e.txtReason()); + throw PDNSException("GSQLBackend unable to list comments for domain id " + std::to_string(domain_id) + ": "+e.txtReason()); } return true; @@ -1556,7 +1556,7 @@ void GSQLBackend::feedComment(const Comment& comment) reset(); } catch (SSqlException &e) { - throw PDNSException("GSQLBackend unable to feed comment: "+e.txtReason()); + throw PDNSException("GSQLBackend unable to feed comment for RRSet '" + comment.qname.toLogString() + "|" + comment.qtype.getName() + "': "+e.txtReason()); } } @@ -1573,7 +1573,7 @@ bool GSQLBackend::replaceComments(const uint32_t domain_id, const DNSName& qname reset(); } catch (SSqlException &e) { - throw PDNSException("GSQLBackend unable to delete comment: "+e.txtReason()); + throw PDNSException("GSQLBackend unable to delete comment for RRSet '" + qname.toLogString() + "|" + qt.getName() + "': "+e.txtReason()); } for(const auto& comment: comments) {