]> granicus.if.org Git - pdns/commitdiff
GSQLBackend::*Comments: log name and type in error
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 15 Mar 2019 11:25:21 +0000 (12:25 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 15 Mar 2019 13:34:47 +0000 (14:34 +0100)
pdns/backends/gsql/gsqlbackend.cc

index 4a10c560d33291c23c41e64a58eb4fdcb8f89683..e8d111c276eade8c31c712c5f3539519f1f4c73d 100644 (file)
@@ -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) {