clanCore ErrorReporting

Classes

class  clan::CrashReporter
 Generates crash reports (aka. minidumps or core dumps) when the application crashes, or when requested. More...
 
class  clan::DetectHang
 Calls CrashReporter::invoke if the constructing thread does not call RunLoop::process for more than 30 seconds. More...
 
class  clan::ExceptionDialog
 Displays a modal dialog with exception details. More...
 

Construction

 clan::CrashReporter::CrashReporter (const std::string &reports_directory, const std::string &uploader_executable=std::string())
 Constructs a crash reporter that creates crash dumps in the specified directory. More...
 
 clan::CrashReporter::~CrashReporter ()
 

Operations

static void clan::CrashReporter::hook_thread ()
 Hooks the current thread to the crash reporter. More...
 
static void clan::CrashReporter::invoke ()
 Force a crash. More...
 
static void clan::CrashReporter::generate_report ()
 Generate a crash report for the current thread without terminating. More...
 

Operations

static void clan::ExceptionDialog::show (const std::exception_ptr &exception)
 Displays a modal dialog with the details of the specified exception. More...
 

Construction

 clan::DetectHang::DetectHang ()
 Constructs a hang detector. More...
 

Detailed Description

Function Documentation

◆ CrashReporter()

clan::CrashReporter::CrashReporter ( const std::string &  reports_directory,
const std::string &  uploader_executable = std::string() 
)

Constructs a crash reporter that creates crash dumps in the specified directory.

If uploader_executable is a non-empty string the executable will be launched if the application crashes.

◆ DetectHang()

clan::DetectHang::DetectHang ( )

Constructs a hang detector.

◆ ~CrashReporter()

clan::CrashReporter::~CrashReporter ( )

◆ generate_report()

static void clan::CrashReporter::generate_report ( )
static

Generate a crash report for the current thread without terminating.

◆ hook_thread()

static void clan::CrashReporter::hook_thread ( )
static

Hooks the current thread to the crash reporter.

The crash reporter will only work for hooked threads.

◆ invoke()

static void clan::CrashReporter::invoke ( )
static

Force a crash.

This is useful for failing asserts.

◆ show()

static void clan::ExceptionDialog::show ( const std::exception_ptr &  exception)
static

Displays a modal dialog with the details of the specified exception.