BusBricks: ErrorState Class Reference
BusBricks  0.1
Customize bus-communication
Loading...
Searching...
No Matches
ErrorState Class Reference

A class to manage and track error states using error codes. More...

#include <ErrorState.h>

Inheritance diagram for ErrorState:
[legend]

Public Member Functions

 ErrorState ()
 Default constructor for ErrorState.
 
 ~ErrorState ()
 Destroy the ErrorState object.
 
void raiseError (errorCodes code)
 raises a new error by setting the given error-code as errorState
 
errorCodes getErrorState ()
 Get the currently active error-code.
 
void clearErrorState ()
 sets the current error-state to "no Error"
 

Detailed Description

A class to manage and track error states using error codes.

The ErrorState class is designed to handle error management by keeping track of the current error state using error codes. It provides methods to raise errors, retrieve the current error state, and clear errors when necessary. The class maintains an internal error code (errorState) to represent the current state that is defined by the enumeration in of the Error-class

Constructor & Destructor Documentation

◆ ErrorState()

ErrorState::ErrorState ( )

Default constructor for ErrorState.

Initializes an empty ErrorState object

Member Function Documentation

◆ getErrorState()

errorCodes ErrorState::getErrorState ( )

Get the currently active error-code.

Returns
char error-code
Here is the caller graph for this function:

◆ raiseError()

void ErrorState::raiseError ( errorCodes code)

raises a new error by setting the given error-code as errorState

Parameters
codeerror-code of error to raise
Here is the caller graph for this function:

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