class ExitOnError

Declaration

class ExitOnError { /* full declaration omitted */ };

Description

Helper for check-and-exit error handling. For tool use only. NOT FOR USE IN LIBRARY CODE.

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

Method Overview

  • public ExitOnError(std::string Banner = "", int DefaultErrorExitCode = 1)
  • public void setBanner(std::string Banner)
  • public void setExitCodeMapper(std::function<int (const Error &)> GetExitCode)

Methods

ExitOnError(std::string Banner = "",
            int DefaultErrorExitCode = 1)

Description

Create an error on exit helper.

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

Parameters

std::string Banner = ""
int DefaultErrorExitCode = 1

void setBanner(std::string Banner)

Description

Set the banner string for any errors caught by operator().

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

Parameters

std::string Banner

void setExitCodeMapper(
    std::function<int(const Error&)> GetExitCode)

Description

Set the exit-code mapper function.

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

Parameters

std::function<int(const Error&)> GetExitCode