IError Class Referenceabstract

Interface for Kernel error implementationIError interface aims at providing information about an error occurring in the framework. One specific concept here is the notion of nested errors. In a call stack, it can be interesting to catch a n-1 level error and enhance it instead of rethrowing it directy unchanged. In this case, we say the level n-1 error is nested into the level n error. More...

Inheritance diagram for IError:
IKernelObject IObject

Public Member Functions

virtual const char * getErrorString () const =0
 Retrieve error description.
 
virtual const char * getErrorLocation () const =0
 Retrieve error location. More...
 
virtual OpenViBE::Kernel::ErrorType getErrorType () const =0
 Retrieve error type.
 
virtual const OpenViBE::Kernel::IErrorgetNestedError () const =0
 Retrieve nested error. More...
 
- Public Member Functions inherited from IObject
virtual OpenViBE::CIdentifier getClassIdentifier (void) const =0
 Returns the final class identifier of the concrete class. More...
 
virtual OpenViBE::boolean isDerivedFromClass (const OpenViBE::CIdentifier &rClassIdentifier) const
 Checks if this object is compatible with a class identifier. More...
 
virtual OpenViBE::boolean acceptVisitor (OpenViBE::IObjectVisitor &rObjectVisitor)
 Requests this object to accept a visitor. More...
 

Detailed Description

Interface for Kernel error implementation

IError interface aims at providing information about an error occurring in the framework. One specific concept here is the notion of nested errors. In a call stack, it can be interesting to catch a n-1 level error and enhance it instead of rethrowing it directy unchanged. In this case, we say the level n-1 error is nested into the level n error.

Author
Charles Garraud (Inria)
Date
2016-07-12

Member Function Documentation

virtual const char* getErrorLocation ( ) const
pure virtual

Retrieve error location.

Returns
the error location with file:line format
virtual const OpenViBE::Kernel::IError* getNestedError ( ) const
pure virtual

Retrieve nested error.

Returns
the nested error if there is one, nullptr otherwise
Warning
The error keeps the ownership of the nested error. Therefore the API consumer is not responsible for its life cycle/management