Skip to content

Commit

Permalink
Catch exceptions by-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Apr 30, 2018
1 parent a87916d commit 819861f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pdns/backends/gsql/gsqlbackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion pdns/dnspcap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ try
}
}
}
catch(EofException) {
catch(const EofException&) {
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions pdns/ws-auth.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);

Expand Down Expand Up @@ -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");
}

Expand Down

0 comments on commit 819861f

Please sign in to comment.