AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::acsdkCrypto::OpenSslErrorCleanup Class Reference

Helper class for handling OpenSSL errors. More...

#include <OpenSslErrorCleanup.h>

Inheritance diagram for alexaClientSDK::acsdkCrypto::OpenSslErrorCleanup:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acsdkCrypto::OpenSslErrorCleanup:
Collaboration graph
[legend]

Public Member Functions

 OpenSslErrorCleanup (const std::string &logTag) noexcept
 Constructs cleanup object. More...
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::error::FinallyGuard
 FinallyGuard (const std::function< void()> &finallyFunction)
 
 ~FinallyGuard ()
 

Static Public Member Functions

static void clearAndLogOpenSslErrors (const std::string &logTag) noexcept
 Method clears openssl error queue and prints it to logger. More...
 

Detailed Description

Helper class for handling OpenSSL errors.

This class automatically clears OpenSSL error queue and logs errors to log on destruction. This helps with troubleshooting OpenSSL errors.

Constructor & Destructor Documentation

◆ OpenSslErrorCleanup()

alexaClientSDK::acsdkCrypto::OpenSslErrorCleanup::OpenSslErrorCleanup ( const std::string &  logTag)
noexcept

Constructs cleanup object.

Initializes finally object to clean up OpenSSL error queue on destructor. Internally this method configures FinallyGuard to call clearAndLogOpenSslErrors() when destructor is called.

Parameters
[in]logTagLogging tag to use.

Member Function Documentation

◆ clearAndLogOpenSslErrors()

void alexaClientSDK::acsdkCrypto::OpenSslErrorCleanup::clearAndLogOpenSslErrors ( const std::string &  logTag)
staticnoexcept

Method clears openssl error queue and prints it to logger.

This method clears OpenSSL error queue and prints errors to logger with a given tag.

Parameters
[in]logTagLogging tag to use.

The documentation for this class was generated from the following files:

AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0