class ECError

Declaration

class ECError : public ErrorInfo { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/Support/Error.h:1099

Inherits from: ErrorInfo

Member Variables

protected std::error_code EC
public static char ID

Method Overview

Methods

ECError()

Declared at: llvm/include/llvm/Support/Error.h:1113

ECError(std::error_code EC)

Declared at: llvm/include/llvm/Support/Error.h:1114

Parameters

std::error_code EC

std::error_code convertToErrorCode() const

Description

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.

Declared at: llvm/include/llvm/Support/Error.h:1106

void log(llvm::raw_ostream& OS) const

Description

Print an error message to an output stream.

Declared at: llvm/include/llvm/Support/Error.h:1107

Parameters

llvm::raw_ostream& OS

void setErrorCode(std::error_code EC)

Declared at: llvm/include/llvm/Support/Error.h:1105

Parameters

std::error_code EC