Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::crash Namespace Reference

Classes

struct  crash_handlers
 
struct  exception_info
 Exception information structure
More...
 
struct  signal_info
 Signal information structure. More...
 
struct  trace_info
 Stack trace information. More...
 

Typedefs

using interrupt_handler_t = void(*)(const signal_info& info)
 
using termination_handler_t = void(*)(const signal_info& info)
 
using crash_handler_t = void(*)(const signal_info& info, const trace_info& trace)
 
using exception_handler_t = void(*)(const exception_info& info, const trace_info& trace)
 

Enumerations

enum class  signal_type { interrupt , termination , crash }
 

Functions

auto get_signal_name (int sig) noexcept -> std::string_view
 
auto is_crash_signal (int sig) noexcept -> bool
 
auto signal_handler (int sig) -> void
 
auto set_interrupt_handler (interrupt_handler_t handler) -> void
 
auto set_termination_handler (termination_handler_t handler) -> void
 
auto set_crash_handler (crash_handler_t handler) -> void
 
auto set_exception_handler (exception_handler_t handler) -> void
 
auto get_signal_type (int sig) noexcept -> signal_type
 
void terminate_handler ()
 
void register_terminate_handler ()
 
auto install_handlers (const crash_handlers &handlers) -> void
 Install comprehensive crash handlers.
 

Typedef Documentation

◆ crash_handler_t

using unravel::crash::crash_handler_t = void(*)(const signal_info& info, const trace_info& trace)

Definition at line 48 of file crash.hpp.

◆ exception_handler_t

using unravel::crash::exception_handler_t = void(*)(const exception_info& info, const trace_info& trace)

Definition at line 49 of file crash.hpp.

◆ interrupt_handler_t

using unravel::crash::interrupt_handler_t = void(*)(const signal_info& info)

Definition at line 46 of file crash.hpp.

◆ termination_handler_t

using unravel::crash::termination_handler_t = void(*)(const signal_info& info)

Definition at line 47 of file crash.hpp.

Enumeration Type Documentation

◆ signal_type

enum class unravel::crash::signal_type
strong
Enumerator
interrupt 
termination 
crash 

Definition at line 135 of file crash.cpp.

Function Documentation

◆ get_signal_name()

auto unravel::crash::get_signal_name ( int sig) -> std::string_view
noexcept

Definition at line 86 of file crash.cpp.

◆ get_signal_type()

auto unravel::crash::get_signal_type ( int sig) -> signal_type
noexcept

Definition at line 137 of file crash.cpp.

◆ install_handlers()

auto unravel::crash::install_handlers ( const crash_handlers & handlers) -> void

Install comprehensive crash handlers.

Sets up all crash detection mechanisms for the current platform. This function is thread-safe and can be called multiple times.

Note
Call the set_*_handler functions before calling this to customize behavior

Definition at line 313 of file crash.cpp.

◆ is_crash_signal()

auto unravel::crash::is_crash_signal ( int sig) -> bool
noexcept

Definition at line 180 of file crash.cpp.

◆ register_terminate_handler()

void unravel::crash::register_terminate_handler ( )

Definition at line 307 of file crash.cpp.

◆ set_crash_handler()

auto unravel::crash::set_crash_handler ( crash_handler_t handler) -> void

Definition at line 76 of file crash.cpp.

◆ set_exception_handler()

auto unravel::crash::set_exception_handler ( exception_handler_t handler) -> void

Definition at line 81 of file crash.cpp.

◆ set_interrupt_handler()

auto unravel::crash::set_interrupt_handler ( interrupt_handler_t handler) -> void

Definition at line 66 of file crash.cpp.

◆ set_termination_handler()

auto unravel::crash::set_termination_handler ( termination_handler_t handler) -> void

Definition at line 71 of file crash.cpp.

◆ signal_handler()

auto unravel::crash::signal_handler ( int sig) -> void

Definition at line 185 of file crash.cpp.

◆ terminate_handler()

void unravel::crash::terminate_handler ( )

Definition at line 240 of file crash.cpp.