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);
133#define wpi_unreachable(msg) \
134 ::wpi::wpi_unreachable_internal(msg, __FILE__, __LINE__)
135#elif defined(LLVM_BUILTIN_UNREACHABLE)
136#define wpi_unreachable(msg) LLVM_BUILTIN_UNREACHABLE
138#define wpi_unreachable(msg) ::wpi::wpi_unreachable_internal()
then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file
Definition: ThirdPartyNotices.txt:195
basic_string_view< char > string_view
Definition: core.h:520
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18
void remove_fatal_error_handler()
Restores default error handling behavior.
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(* fatal_error_handler_t)(void *user_data, const char *reason, bool gen_crash_diag)
An error handler callback.
Definition: ErrorHandling.h:24
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