ADTF
Loading...
Searching...
No Matches
adtf::base::cErrorHandler Class Reference

#include <error_handling_intf.h>

Inherits adtf::ucom::catwo::object< IErrorHandling::IErrorHandler >.

Public Member Functions

 cErrorHandler (const char *strErrorSource, const char *strErrorCategory, IErrorHandling::tAction eAction)
 
void Handle (tResult oError) override
 
IErrorHandling::tAction GetAction () const
 
void SetAction (IErrorHandling::tAction eAction)
 
const char * GetErrorSource () const
 
const char * GetErrorCategory () const
 
- Public Member Functions inherited from adtf::ucom::catwo::object< IErrorHandling::IErrorHandler >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

Base class for implementing error handlers.

Constructor & Destructor Documentation

◆ cErrorHandler()

adtf::base::elasto::cErrorHandler::cErrorHandler ( const char * strErrorSource,
const char * strErrorCategory,
IErrorHandling::tAction eAction )

Constructs a new error handler.

Parameters
[in]strErrorSourceThe name of the error source.
[in]strErrorCategoryThe name of the error category.
[in]eActionThe action that should be taken if an error occurs.

Member Function Documentation

◆ GetAction()

IErrorHandling::tAction adtf::base::elasto::cErrorHandler::GetAction ( ) const
Returns
The action that is currently set.

◆ GetErrorCategory()

const char * adtf::base::elasto::cErrorHandler::GetErrorCategory ( ) const
Returns
The error category name.

◆ GetErrorSource()

const char * adtf::base::elasto::cErrorHandler::GetErrorSource ( ) const
Returns
The error source name.

◆ Handle()

void adtf::base::elasto::cErrorHandler::Handle ( tResult oError)
override

Call this to notify the error handling of an error that occured. Note that you still need to deal with this error in your component as good as possible!

Parameters
[in]oErrorThe error result.

◆ SetAction()

void adtf::base::elasto::cErrorHandler::SetAction ( IErrorHandling::tAction eAction)

Sets the current action in case an error occurs.

Parameters
[in]eActionThe new action.

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