LLVM: llvm::ECError Class Reference (original) (raw)

This class wraps a std::error_code in a Error. More...

#include "[llvm/Support/Error.h](llvm%5F2Support%5F2Error%5F8h%5Fsource.html)"

Public Member Functions
void setErrorCode (std::error_code EC)
std::error_code convertToErrorCode () const override
Convert this error to a std::error_code.
void log (raw_ostream &OS) const override
Print an error message to an output stream.
Public Member Functions inherited from llvm::ErrorInfo< ECError >
const void * dynamicClassID () const override
bool isA (const void *const ClassID) const override
Public Member Functions inherited from llvm::ErrorInfoBase
virtual ~ErrorInfoBase ()=default
virtual std::string message () const
Return the error message as a string.
template
bool isA () const
Static Public Attributes
static char ID = 0
Protected Member Functions
Protected Attributes
std::error_code EC
Friends
LLVM_ABI friend Error errorCodeToError (std::error_code EC)
Helper for converting an std::error_code to a Error.

This class wraps a std::error_code in a Error.

This is useful if you're writing an interface that returns a Error (or Expected) and you want to call code that still returns std::error_codes.

Definition at line 1193 of file Error.h.

ECError() [1/2]

llvm::ECError::ECError ( ) protecteddefault

ECError() [2/2]

llvm::ECError::ECError ( std::error_code EC) inlineprotected

convertToErrorCode()

std::error_code llvm::ECError::convertToErrorCode ( ) const inlineoverridevirtual

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.

Implements llvm::ErrorInfoBase.

Definition at line 1200 of file Error.h.

References EC.

log()

void llvm::ECError::log ( raw_ostream & OS) const inlineoverridevirtual

setErrorCode()

void llvm::ECError::setErrorCode ( std::error_code EC) inline

errorCodeToError

LLVM_ABI friend Error errorCodeToError ( std::error_code EC) friend

Helper for converting an std::error_code to a Error.

Definition at line 111 of file Error.cpp.

EC

std::error_code llvm::ECError::EC protected

ID

char llvm::ECError::ID = 0 static

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