createFileError overloads

Synopses

Declared in <llvm/Support/Error.h>

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

Error
createFileError(
    Twine const& F,
    Error E);

Deleted overload: a successful Error cannot be wrapped as a FileError.

Error
createFileError(
    Twine const& F,
    ErrorSuccess Unused) = delete;

Concatenate a source file path and/or name with a std::error_code to form an Error object.

Error
createFileError(
    Twine const& F,
    std::error_code EC);

Create a StringError with the specified error code and prepend the file path to it.

Error
createFileError(
    Twine const& F,
    std::error_code EC,
    Twine const& S);

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

Error
createFileError(
    Twine const& F,
    size_t Line,
    Error E);

Concatenate a source file path and/or name with line number and std::error_code to form an Error object.

Error
createFileError(
    Twine const& F,
    size_t Line,
    std::error_code EC);

Create a StringError with the specified error code and prepend the file path to it.

template<typename... Ts>
Error
createFileError(
    Twine const& F,
    std::error_code EC,
    char const* Fmt,
    Ts const&... Vals);

Return Value

  • A FileError associating F with E.

  • A FileError wrapping the error code.

  • A FileError wrapping a StringError for F.

  • A FileError associating F and Line with E.

  • A FileError wrapping the error code at Line.

  • A FileError wrapping a formatted StringError for F.

Parameters

Name

Description

F

Source file path and/or name to associate with the error.

E

Nested error to wrap.

Unused

Success sentinel that makes this overload unusable.

EC

Error code to wrap as a nested Error.

S

Human‐readable message text.

Line

One‐based line number within the file.

Fmt

Printf‐style format string for the message.

Vals

Format arguments for Fmt.

Created with MrDocs