This class wraps a filename and another Error.

Synopsis

Declared in <llvm/Support/Error.h>

class FileError final
    : public ErrorInfo<FileError>

Description

In some cases, an error needs to live along a 'source' name, in order to show more detailed information to the user.

Base Classes

Name

Description

ErrorInfo<FileError>

Base class for user error types. Users should declare their error types like:

Member Functions

Name

Description

convertToErrorCode [virtual]

Convert this file error to a std::error_code.

getFileName

Return the file name associated with this error.

log [virtual]

Write the file name (and optional line) plus nested error to OS.

messageWithoutFileInfo

Return the wrapped error message without the file‐name prefix.

takeError

Take ownership of the wrapped Error, leaving this FileError empty.

Static Member Functions

Name

Description

classID

Return the RTTI class identifier for ThisErrT.

Static Data Members

Name

Description

ID

RTTI identifier used by ErrorInfo::classID.

Using Declarations

Name

Description

ErrorInfo

Inherit constructors from the parent error‐info type.

Friends

Name

Description

llvm::createFileError

Concatenate a source file path and/or name with line number and an Error. The resulting Error is unchecked.

llvm::createFileError

Concatenate a source file path and/or name with an Error. The resulting Error is unchecked.

Created with MrDocs