]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
GSQLBackend::*TSIGKey: log keyname and algo in errors
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 15 Mar 2019 10:53:04 +0000 (11:53 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 15 Mar 2019 13:34:46 +0000 (14:34 +0100)
pdns/backends/gsql/gsqlbackend.cc

index 0ba3dbb66faf57ec573e96a6f67f3a9a6cf0142c..c833f025f8518e8e344737d4fad4aca0ec9b9c6c 100644 (file)
@@ -797,7 +797,7 @@ bool GSQLBackend::getTSIGKey(const DNSName& name, DNSName* algorithm, string* co
     d_getTSIGKeyQuery_stmt->reset();
   }
   catch (SSqlException &e) {
-    throw PDNSException("GSQLBackend unable to retrieve named TSIG key: "+e.txtReason());
+    throw PDNSException("GSQLBackend unable to retrieve TSIG key with name '" + name.toLogString() + "': "+e.txtReason());
   }
 
   return !content->empty();
@@ -816,7 +816,7 @@ bool GSQLBackend::setTSIGKey(const DNSName& name, const DNSName& algorithm, cons
       reset();
   }
   catch (SSqlException &e) {
-    throw PDNSException("GSQLBackend unable to store named TSIG key: "+e.txtReason());
+    throw PDNSException("GSQLBackend unable to store TSIG key with name '" + name.toLogString() + "' and algorithm '" + algorithm.toString() + "': "+e.txtReason());
   }
   return true;
 }
@@ -832,7 +832,7 @@ bool GSQLBackend::deleteTSIGKey(const DNSName& name)
       reset();
   }
   catch (SSqlException &e) {
-    throw PDNSException("GSQLBackend unable to store named TSIG key: "+e.txtReason());
+    throw PDNSException("GSQLBackend unable to delete TSIG key with name '" + name.toLogString() + "': "+e.txtReason());
   }
   return true;
 }