]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Catch exceptions by-ref
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 30 Apr 2018 09:36:44 +0000 (11:36 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 30 Apr 2018 09:36:44 +0000 (11:36 +0200)
pdns/backends/gsql/gsqlbackend.cc
pdns/dnspcap.cc
pdns/ws-auth.cc

index 21453f1699050c710c184e5eb5d8865025ac0405..18a3378ad89fae1a865af26f1ec2f57faaa02a26 100644 (file)
@@ -43,12 +43,12 @@ GSQLBackend::GSQLBackend(const string &mode, const string &suffix)
   setArgPrefix(mode+suffix);
   d_db=0;
   d_logprefix="["+mode+"Backend"+suffix+"] ";
-       
+
   try
   {
     d_dnssecQueries = mustDo("dnssec");
   }
-  catch (ArgException e)
+  catch (const ArgException&)
   {
     d_dnssecQueries = false;
   }
index a3d04fc9c14ef7bb1354af812c65e3d1d163b089..4104b539a759a720d547598724ba941e1d34826d 100644 (file)
@@ -142,7 +142,7 @@ try
     }
   }
 }
-catch(EofException) {
+catch(const EofException&) {
   return false;
 }
 
index 72ecc517451258adc704c2585a6d6699cac5d28d..64188d3f900b516064467a70274b129b5fc2879c 100644 (file)
@@ -574,7 +574,7 @@ static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo&
     bool api_rectify = boolFromJson(document, "api_rectify");
     di.backend->setDomainMetadataOne(zonename, "API-RECTIFY", api_rectify ? "1" : "0");
   }
-  catch (JsonException) {}
+  catch (const JsonException&) {}
 
   if (document["account"].is_string()) {
     di.backend->setAccount(zonename, document["account"].string_value());
@@ -588,7 +588,7 @@ static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo&
     dnssecDocVal = boolFromJson(document, "dnssec");
     dnssecInJSON = true;
   }
-  catch (JsonException) {}
+  catch (const JsonException&) {}
 
   bool isDNSSECZone = dk.isSecuredZone(zonename);
 
@@ -757,7 +757,7 @@ static void apiZoneMetadata(HttpRequest* req, HttpResponse *resp) {
 
     try {
       kind = stringFromJson(document, "kind");
-    } catch (JsonException) {
+    } catch (const JsonException&) {
       throw ApiException("kind is not specified or not a string");
     }