ADTF
IErrorHandlingabstract

Error handling interface. More...

Inheritance diagram for IErrorHandling:
[legend]

Classes

class  IErrorHandler
 Interface for handling an error from a specific error source and error category. More...
 

Public Types

enum class  tAction : uint32_t {
  Ignore = 0 , Log , Stop , Shutdown ,
  Abort
}
 Predefined actions that are supported by the default error handler implementation. More...
 

Public Member Functions

 ADTF_IID (IErrorHandling, "error_handling.elasto.services.adtf.iid")
 
virtual tResult CreateErrorHandler (const char *strErrorSource, const char *strErrorCategory, tAction eDefaultAction, ucom::ant::iobject_ptr< IErrorHandler > &pHandler)=0
 Creates a new error handler for the given source and category. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Additional Inherited Members

- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

Error handling interface.

Please use create_error_handler(), instead of using this interface directly. See Error Handling for further information.

Definition at line 23 of file error_handling_intf.h.

Member Enumeration Documentation

◆ tAction

enum tAction : uint32_t
strong

Predefined actions that are supported by the default error handler implementation.

Enumerator
Ignore 

do nothing.

Log 

log as warning.

Stop 

log error and stop the session.

Shutdown 

log error and shutdown ADTF.

Abort 

abort and create a stack trace.

Definition at line 32 of file error_handling_intf.h.

Member Function Documentation

◆ CreateErrorHandler()

virtual tResult CreateErrorHandler ( const char *  strErrorSource,
const char *  strErrorCategory,
tAction  eDefaultAction,
ucom::ant::iobject_ptr< IErrorHandler > &  pHandler 
)
pure virtual

Creates a new error handler for the given source and category.

Parameters
[in]strErrorSourceThe name of the error source.
[in]strErrorCategoryThe name of the error category.
[in]eDefaultActionThe default action that should be taken if an error occurs.
[out]pHandlerThe new handler.
Returns
Standard result.