AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Error cleanup function on error. More...
#include <ErrorCleanupGuard.h>
Public Member Functions | |
ErrorCleanupGuard (bool &successFlag, std::function< void()> &&cleanupFunction) noexcept | |
Prepares lambda for execution. More... | |
Public Member Functions inherited from alexaClientSDK::avsCommon::utils::error::FinallyGuard | |
FinallyGuard (const std::function< void()> &finallyFunction) | |
~FinallyGuard () | |
Error cleanup function on error.
This object executes lambda on destruction only if success variable is false.
|
inlinenoexcept |
Prepares lambda for execution.
This method constructs FinallyGuard
that will trigger successFlag check and optional cleanupFunction execution on destruction.
[in] | successFlag | Flag to check if cleanupFunction needs to be executed. |
[in] | cleanupFunction | Function reference to execute if successFlag is false. |
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0