| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | List of all members
StatusCode::Category Class Referenceabstract

The category assigned to a StatusCode. More...

`#include <GaudiKernel/StatusCode.h>`

## Public Member Functions
constexpr | Category () noexcept=default
virtual | ~Category ()
virtual const char * | name () const =0
| Name of the category. More...
virtual std::string | message (code_t code) const
| Description for code within this category. More...
virtual bool | isSuccess (code_t code) const
| Is code considered success ? More...
virtual bool | isRecoverable (code_t code) const
| Is code considered recoverable ? More...

## Detailed Description

The category assigned to a StatusCode.

Derive from this class to implement your own category. The mapping of StatusCode values to success and recoverable conditions can be defined by overriding the appropriate methods.

Definition at line 63 of file StatusCode.h.

## Constructor & Destructor Documentation

## ◆ Category()

constexpr StatusCode::Category::Category | ( |  | ) |
| default noexcept

## ◆ ~Category()

virtual StatusCode::Category::~Category | ( |  | ) |
| inline virtual

Definition at line 65 of file StatusCode.h.

65 {}

## Member Function Documentation

## ◆ isRecoverable()

virtual bool StatusCode::Category::isRecoverable | ( | code_t | code | ) | const
| inline virtual

Is code considered recoverable ?

Definition at line 78 of file StatusCode.h.

78 { return code == static_cast<code_t>( ErrorCode::RECOVERABLE ); }
StatusCode::ErrorCode::RECOVERABLE

## ◆ isSuccess()

virtual bool StatusCode::Category::isSuccess | ( | code_t | code | ) | const
| inline virtual

Is code considered success ?

Note
  isFailure() cannot be overridden as it is defined as `!`isSuccess()

Definition at line 75 of file StatusCode.h.

75 { return code == static_cast<code_t>( ErrorCode::SUCCESS ); }
StatusCode::ErrorCode::SUCCESS

## ◆ message()

virtual std::string StatusCode::Category::message | ( | code_t | code | ) | const
| inline virtual

Description for code within this category.

Definition at line 71 of file StatusCode.h.

71 { return "UNKNOWN(" + std::to_string( code ) + ")"; }
std::to_string
T to_string(T... args)

## ◆ name()

virtual const char* StatusCode::Category::name | ( |  | ) | const
| pure virtual

Name of the category.

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

- GaudiKernel/GaudiKernel/StatusCode.h