Skip to content

Commit

Permalink
envoy: reverting unnecessary exception E-M macros (#32745)
Browse files Browse the repository at this point in the history

Signed-off-by: Alyssa Wilk <[email protected]>
  • Loading branch information
alyssawilk authored Mar 7, 2024
1 parent 8ac6d0c commit 3258b4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions source/common/quic/quic_server_transport_socket_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void initializeQuicCertAndKey(Ssl::TlsContext& context,
std::istringstream pem_stream(cert_str);
auto pem_result = quic::ReadNextPemMessage(&pem_stream);
if (pem_result.status != quic::PemReadResult::Status::kOk) {
throwEnvoyExceptionOrPanic(
throw EnvoyException(
"Error loading certificate in QUIC context: error from ReadNextPemMessage");
}
chain.push_back(std::move(pem_result.contents));
Expand All @@ -72,7 +72,7 @@ void initializeQuicCertAndKey(Ssl::TlsContext& context,
bssl::UniquePtr<EVP_PKEY> pub_key(X509_get_pubkey(context.cert_chain_.get()));
int sign_alg = deduceSignatureAlgorithmFromPublicKey(pub_key.get(), &error_details);
if (sign_alg == 0) {
throwEnvoyExceptionOrPanic(
throw EnvoyException(
absl::StrCat("Failed to deduce signature algorithm from public key: ", error_details));
}

Expand All @@ -83,7 +83,7 @@ void initializeQuicCertAndKey(Ssl::TlsContext& context,
std::unique_ptr<quic::CertificatePrivateKey> pem_key =
std::make_unique<quic::CertificatePrivateKey>(std::move(privateKey));
if (pem_key == nullptr) {
throwEnvoyExceptionOrPanic("Failed to load QUIC private key.");
throw EnvoyException("Failed to load QUIC private key.");
}

context.quic_private_key_ = std::move(pem_key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void HttpSubscriptionImpl::disableInitFetchTimeoutTimer() {
std::chrono::milliseconds HttpSubscriptionFactory::apiConfigSourceRefreshDelay(
const envoy::config::core::v3::ApiConfigSource& api_config_source) {
if (!api_config_source.has_refresh_delay()) {
throwEnvoyExceptionOrPanic("refresh_delay is required for REST API configuration sources");
throw EnvoyException("refresh_delay is required for REST API configuration sources");
}

return std::chrono::milliseconds(
Expand Down

0 comments on commit 3258b4b

Please sign in to comment.