14#ifndef WPIUTIL_WPI_ERRORHANDLING_H
15#define WPIUTIL_WPI_ERRORHANDLING_H
45 void *user_data =
nullptr);
55 void *user_data =
nullptr) {
71 bool gen_crash_diag =
true);
73 bool gen_crash_diag =
true);
75 bool gen_crash_diag =
true);
94 void *user_data =
nullptr);
114 bool GenCrashDiag =
true);
142#define wpi_unreachable(msg) \
143 ::wpi::wpi_unreachable_internal(msg, __FILE__, __LINE__)
144#elif !defined(LLVM_BUILTIN_UNREACHABLE)
145#define wpi_unreachable(msg) ::wpi::wpi_unreachable_internal()
146#elif LLVM_UNREACHABLE_OPTIMIZE
147#define wpi_unreachable(msg) LLVM_BUILTIN_UNREACHABLE
149#define wpi_unreachable(msg) \
152 LLVM_BUILTIN_UNREACHABLE; \
then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file
Definition: ThirdPartyNotices.txt:192
basic_string_view< char > string_view
Definition: core.h:501
Definition: ntcore_cpp.h:26
void remove_fatal_error_handler()
Restores default error handling behaviour.
void wpi_unreachable_internal(const char *msg=nullptr, const char *file=nullptr, unsigned line=0)
This function calls abort(), and prints the optional message to stderr.
void install_fatal_error_handler(fatal_error_handler_t handler, void *user_data=nullptr)
install_fatal_error_handler - Installs a new error handler to be used whenever a serious (non-recover...
void report_fatal_error(const char *reason, bool gen_crash_diag=true)
Reports a serious error, calling any installed error handler.
void remove_bad_alloc_error_handler()
Restores default bad alloc error handling behavior.
void report_bad_alloc_error(const char *Reason, bool GenCrashDiag=true)
Reports a bad alloc error, calling any user defined bad alloc error handler.
void install_bad_alloc_error_handler(fatal_error_handler_t handler, void *user_data=nullptr)
Installs a new bad alloc error handler that should be used whenever a bad alloc error,...
void install_out_of_memory_new_handler()
ScopedFatalErrorHandler - This is a simple helper class which just calls install_fatal_error_handler ...
Definition: ErrorHandling.h:53
~ScopedFatalErrorHandler()
Definition: ErrorHandling.h:59
ScopedFatalErrorHandler(fatal_error_handler_t handler, void *user_data=nullptr)
Definition: ErrorHandling.h:54
void(* fatal_error_handler_t)(void *user_data, const char *reason, bool gen_crash_diag)
An error handler callback.
Definition: ErrorHandling.h:24