RTC Toolkit 6.0.0-pre2
Loading...
Searching...
No Matches
rtctk::telSub::BlenderErrorCategory Class Reference

Error category for blender errors. More...

#include <rtctk/telSub/blenderError.hpp>

Inheritance diagram for rtctk::telSub::BlenderErrorCategory:

Public Member Functions

const char * name () const noexcept override
 Returns the name of this error category.
 
std::string message (int ev) const override
 Returns a descriptive message for an error code.
 
std::error_code MakeBlenderError (GenericBlenderError e) const noexcept
 Creates an error_code from a BlenderError.
 

Detailed Description

Error category for blender errors.

This is the default error category used by the Telemetry Subscriber for blender errors. It provides standard error messages for common blender failure scenarios.

To use with std::error_code:

// Get the static error category instance
const std::error_category& cat = GetBlenderErrorCategory();
// Create an error code for a missing topic
std::error_code ec(static_cast<int>(GenericBlenderError::MissingTopic), cat);
// Or use the helper function
std::error_code MakeBlenderError(GenericBlenderError e) const noexcept
Creates an error_code from a BlenderError.
Definition blenderError.hpp:98
@ MissingTopic
Required topic was not found in the input data.
Definition blenderError.hpp:31
const std::error_category & GetBlenderErrorCategory() noexcept
Returns a reference to the global blender error category instance.
Definition blenderError.cpp:20

Member Function Documentation

◆ MakeBlenderError()

std::error_code rtctk::telSub::BlenderErrorCategory::MakeBlenderError ( GenericBlenderError e) const
inlinenoexcept

Creates an error_code from a BlenderError.

Parameters
eThe BlenderError to convert.
Returns
An error_code representing the error.

◆ message()

std::string rtctk::telSub::BlenderErrorCategory::message ( int ev) const
inlineoverride

Returns a descriptive message for an error code.

Parameters
evThe error value (should be a value from BlenderError enum).
Returns
A string describing the error.

◆ name()

const char * rtctk::telSub::BlenderErrorCategory::name ( ) const
inlineoverridenoexcept

Returns the name of this error category.

Returns
The string "blender" identifying this category.

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