Permalink
Browse files

improve error message in illformated unknown record type, thanks Jelt…

…e for reporting
  • Loading branch information...
1 parent 90921cd commit 70d5a6638e6cb7843cfe464761798d47f480805c @ahupowerdns ahupowerdns committed Jun 12, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 pdns/dnsparser.cc
View
@@ -60,7 +60,7 @@ class UnknownRecordContent : public DNSRecordContent
const string& relevant=(parts.size() > 2) ? parts[2] : "";
unsigned int total=atoi(parts[1].c_str());
if(relevant.size()!=2*total)
- throw runtime_error("invalid unknown record");
+ throw MOADNSException((boost::format("invalid unknown record length for label %s: size not equal to length field (%d != %d)") % d_dr.d_label.c_str() % relevant.size() % (2*total)).str());
string out;
out.reserve(total+1);
for(unsigned int n=0; n < total; ++n) {

0 comments on commit 70d5a66

Please sign in to comment.