Helper for check-and-exit error handling.
More...
#include "llvm/Support/Error.h"
Helper for check-and-exit error handling.
For tool use only. NOT FOR USE IN LIBRARY CODE.
Definition at line 1141 of file Error.h.
◆ ExitOnError()
| llvm::ExitOnError::ExitOnError |
( |
std::string |
Banner = "", |
|
|
int |
DefaultErrorExitCode = 1 |
|
) |
| |
|
inline |
Create an error on exit helper.
Definition at line 1144 of file Error.h.
◆ operator()() [1/3]
| void llvm::ExitOnError::operator() |
( |
Error |
Err | ) |
const |
|
inline |
Check Err. If it's in a failure state log the error(s) and exit.
Definition at line 1157 of file Error.h.
◆ operator()() [2/3]
template<typename T >
| T llvm::ExitOnError::operator() |
( |
Expected< T > && |
E | ) |
const |
|
inline |
Check E.
If it's in a success state then return the contained value. If it's in a failure state log the error(s) and exit.
Definition at line 1161 of file Error.h.
◆ operator()() [3/3]
template<typename T >
| T& llvm::ExitOnError::operator() |
( |
Expected< T &> && |
E | ) |
const |
|
inline |
Check E.
If it's in a success state then return the contained reference. If it's in a failure state log the error(s) and exit.
Definition at line 1168 of file Error.h.
References E.
◆ setBanner()
| void llvm::ExitOnError::setBanner |
( |
std::string |
Banner | ) |
|
|
inline |
Set the banner string for any errors caught by operator().
Definition at line 1149 of file Error.h.
◆ setExitCodeMapper()
Set the exit-code mapper function.
Definition at line 1152 of file Error.h.
The documentation for this class was generated from the following file: