|
LLVM 22.0.0git
|
Helper for check-and-exit error handling. More...
#include "llvm/Support/Error.h"
Public Member Functions | |
| ExitOnError (std::string Banner="", int DefaultErrorExitCode=1) | |
| Create an error on exit helper. | |
| void | setBanner (std::string Banner) |
| Set the banner string for any errors caught by operator(). | |
| void | setExitCodeMapper (std::function< int(const Error &)> GetExitCode) |
| Set the exit-code mapper function. | |
| void | operator() (Error Err) const |
| Check Err. If it's in a failure state log the error(s) and exit. | |
| template<typename T> | |
| T | operator() (Expected< T > &&E) const |
| Check E. | |
| template<typename T> | |
| T & | operator() (Expected< T & > &&E) const |
| Check E. | |
Helper for check-and-exit error handling.
For tool use only. NOT FOR USE IN LIBRARY CODE.
|
inline |
Create an error on exit helper.
Definition at line 1447 of file Error.h.
References const, and llvm::move().
|
inline |
|
inline |