AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::properties::ErrorCallbackInterface Class Referenceabstract

Callback interface to handle errors. More...

#include <ErrorCallbackInterface.h>

Public Member Functions

virtual ~ErrorCallbackInterface () noexcept=default
 
virtual Action onOpenPropertiesError (StatusCode status, const std::string &configUri) noexcept=0
 Handler of open properties error. More...
 
virtual Action onGetPropertyError (StatusCode status, const std::string &configUri) noexcept=0
 Handler of get property errors. More...
 
virtual Action onPutPropertyError (StatusCode status, const std::string &configUri) noexcept=0
 Handler of put property errors. More...
 

Detailed Description

Callback interface to handle errors.

When framework has a callback handler installed, the handler may override default framework actions on error situations.

See also
setErrorCallback()

Constructor & Destructor Documentation

◆ ~ErrorCallbackInterface()

virtual alexaClientSDK::properties::ErrorCallbackInterface::~ErrorCallbackInterface ( )
virtualdefaultnoexcept

Member Function Documentation

◆ onGetPropertyError()

virtual Action alexaClientSDK::properties::ErrorCallbackInterface::onGetPropertyError ( StatusCode  status,
const std::string &  configUri 
)
pure virtualnoexcept

Handler of get property errors.

This handler is invoked when getting string or binary property call encounters an error.

Parameters
[in]statusStatus code. Handler must be able to handle unknown error codes.
[in]configUriConfiguration URI for the properties container.
Returns
Preferred action to continue.
Return values
Action::DEFAULTExecute default action. The framework decides what to do.
Action::FAILFails the call. The framework aborts the operation and returns an error code to caller.
Action::CLEAR_DATASignals to framework to clear the property value and continue normally. The caller will get an error as a result.
Action::RETRYSignals to framework to retry failed operation.

◆ onOpenPropertiesError()

virtual Action alexaClientSDK::properties::ErrorCallbackInterface::onOpenPropertiesError ( StatusCode  status,
const std::string &  configUri 
)
pure virtualnoexcept

Handler of open properties error.

This handler is invoked when open properties call encounters an error.

Parameters
[in]statusStatus code. Handler must be able to handle unknown error codes.
[in]configUriConfiguration URI for the properties container.
Returns
Preferred action to continue.
Return values
Action::CONTINUEExecute default action. The framework decides what to do.
Action::FAILFails the call. The framework aborts the operation and returns an error code to caller.
Action::CLEAR_DATASignals to framework to clear all container's data and continue normally.
Action::RETRYSignals to framework to retry failed operation.

◆ onPutPropertyError()

virtual Action alexaClientSDK::properties::ErrorCallbackInterface::onPutPropertyError ( StatusCode  status,
const std::string &  configUri 
)
pure virtualnoexcept

Handler of put property errors.

This handler is invoked when setting string or binary property call encounters an error.

Parameters
[in]statusStatus code. Handler must be able to handle unknown error codes.
[in]configUriConfiguration URI for the properties container.
Returns
Preferred action to continue.
Return values
Action::CONTINUEExecute default action. The framework decides what to do.
Action::FAILFails the call. The framework aborts the operation and returns an error code to caller.
Action::CLEAR_DATASignals to framework to clear the property value and continue normally.
Action::RETRYSignals to framework to retry failed operation.

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

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