From 31f4737d656e2a3396addcdc736d445be48f1fe7 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Fri, 15 Mar 2019 12:25:21 +0100 Subject: [PATCH] GSQLBackend::*Comments: log name and type in error --- pdns/backends/gsql/gsqlbackend.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/backends/gsql/gsqlbackend.cc b/pdns/backends/gsql/gsqlbackend.cc index 4a10c560d3..e8d111c276 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) { -- 2.47.3