WPILibC++  2020.3.2-60-g3011ebe
wpi::ErrorInfoBase Class Referenceabstract

Base class for error info classes. More...

#include <Error.h>

Inheritance diagram for wpi::ErrorInfoBase:
wpi::ErrorInfo< ECError > wpi::ErrorInfo< ErrorList > wpi::ErrorInfo< FileError > wpi::ErrorInfo< StringError > wpi::ECError wpi::ErrorList wpi::FileError wpi::StringError

Public Member Functions

virtual void log (raw_ostream &OS) const =0
 Print an error message to an output stream.
virtual std::string message () const
 Return the error message as a string.
virtual std::error_code convertToErrorCode () const =0
 Convert this error to a std::error_code. More...
virtual const void * dynamicClassID () const =0
virtual bool isA (const void *const ClassID) const
template<typename ErrorInfoT >
bool isA () const

Static Public Member Functions

static const void * classID ()

Detailed Description

Base class for error info classes.

Do not extend this directly: Extend the ErrorInfo template subclass instead.

Member Function Documentation

◆ convertToErrorCode()

virtual std::error_code wpi::ErrorInfoBase::convertToErrorCode ( ) const
pure virtual

Convert this error to a std::error_code.

This is a temporary crutch to enable interaction with code still using std::error_code. It will be removed in the future.

Implemented in wpi::FileError, wpi::StringError, wpi::ECError, and wpi::ErrorList.

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