From: Pieter Lexis Date: Fri, 15 Mar 2019 10:53:04 +0000 (+0100) Subject: GSQLBackend::*TSIGKey: log keyname and algo in errors X-Git-Tag: dnsdist-1.4.0-alpha1~53^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee174fb2d2ea0c62721a4efd5aa3aa4ec0ed7783;p=thirdparty%2Fpdns.git GSQLBackend::*TSIGKey: log keyname and algo in errors --- diff --git a/pdns/backends/gsql/gsqlbackend.cc b/pdns/backends/gsql/gsqlbackend.cc index 0ba3dbb66f..c833f025f8 100644 --- a/pdns/backends/gsql/gsqlbackend.cc +++ b/pdns/backends/gsql/gsqlbackend.cc @@ -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; }