ΒΆvoid install_fatal_error_handler(
llvm::fatal_error_handler_t handler,
void* user_data = nullptr)
void install_fatal_error_handler(
llvm::fatal_error_handler_t handler,
void* user_data = nullptr)
Description
install_fatal_error_handler - Installs a new error handler to be used whenever a serious (non-recoverable) error is encountered by LLVM. If no error handler is installed the default is to print the error message to stderr, and call exit(1). If an error handler is installed then it is the handler's responsibility to log the message, it will no longer be printed to stderr. If the error handler returns, then exit(1) will be called. It is dangerous to naively use an error handler which throws an exception. Even though some applications desire to gracefully recover from arbitrary faults, blindly throwing exceptions through unfamiliar code isn't a way to achieve this.
Declared at: llvm/include/llvm/Support/ErrorHandling.h:45
Parameters
- llvm::fatal_error_handler_t handler
- void* user_data = nullptr
- - An argument which will be passed to the install error handler.