Skip to content

Commit

Permalink
make sure we actually report the exception a backend gave us. Thanks …
Browse files Browse the repository at this point in the history
…Aki Tuomi. Closes #639

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2985 d19b8d6e-7fed-0310-83ef-9ca221ded41b
  • Loading branch information
Peter van Dijk committed Dec 12, 2012
1 parent 81fec33 commit 06ad452
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pdns/dnsbackend.cc
Expand Up @@ -182,7 +182,13 @@ vector<DNSBackend *>BackendMakerClass::all(bool metadataOnly)
ret.push_back(made);
}
}
catch(...) {
catch(AhuException &ae) {
L<<Logger::Error<<"Caught an exception instantiating a backend: "<<ae.reason<<endl;
L<<Logger::Error<<"Cleaning up"<<endl;
for(vector<DNSBackend *>::const_iterator i=ret.begin();i!=ret.end();++i)
delete *i;
throw;
} catch(...) {
// and cleanup
L<<Logger::Error<<"Caught an exception instantiating a backend, cleaning up"<<endl;
for(vector<DNSBackend *>::const_iterator i=ret.begin();i!=ret.end();++i)
Expand Down

0 comments on commit 06ad452

Please sign in to comment.