llvm::createStringError

createStringError overloads

Synopses

Declared in <llvm/Support/Error.h>

Create a StringError with an inconvertible error code.

Error
createStringError(Twine const& S);
» more...

Create a StringError from error code EC and Twine message S.

Error
createStringError(
    std::error_code EC,
    Twine const& S);
» more...

Create a StringError from error code EC and message S.

Error
createStringError(
    std::error_code EC,
    char const* S);
» more...

Create a StringError from error code EC and message Msg.

Error
createStringError(
    std::string&& Msg,
    std::error_code EC);
» more...

Create a StringError with an inconvertible error code and printf-style Fmt.

template<typename... Ts>
Error
createStringError(
    char const* Fmt,
    Ts const&... Vals);
» more...

Create a StringError from std::errc EC and printf-style Fmt.

template<typename... Ts>
Error
createStringError(
    std::errc EC,
    char const* Fmt,
    Ts const&... Vals);
» more...

Create formatted StringError object.

template<typename... Ts>
Error
createStringError(
    std::error_code EC,
    char const* Fmt,
    Ts const&... Vals);
» more...

Return Value

  • A StringError with an inconvertible code and message S.
  • A StringError with code EC and message S.
  • A StringError with message Msg and code EC.
  • A StringError with an inconvertible code and the formatted message.
  • A StringError with the formatted message.
  • A StringError with code EC and the formatted message.

Parameters

NameDescription
SHuman-readable error message.
ECError code stored in the StringError.
MsgHuman-readable error message (moved into the error).
FmtPrintf-style format string for the message.
ValsFormat arguments for Fmt.