CrashHandler Class Reference

#include <crashhandler.h>

详细描述

Private custom crash handler.

Public Types

using  CallbackPtr = void(*)(const CrashReportState &crashState)

公共成员函数

  MAXON_OBSERVABLE_STATIC (void, ObservableCrashDataDirectory,(const Url &dataDirectory), ObservableCombinerRunAllComponent)

静态公共成员函数

static MAXON_METHOD Bool   SetCallback ( CallbackPtr callback)
static MAXON_METHOD Bool   SetSecondaryCallback ( CallbackPtr callback)
static MAXON_METHOD Result < void >  SetCrashDataDirectory (const Url &dataDirectory)
static MAXON_METHOD void  DisplayCrashDialog (const String &title, const String &message)
static MAXON_METHOD Result < void >  GetProcessModules ( WritableArrayInterface < CrashModuleEntry > &modules)
static MAXON_METHOD Result < void >  ResolveBugReport (const Url &report, const Url &symbolFileArchives, const Url &temporaryDir)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( CrashHandler , MAXON_REFERENCE_NONE , "net.maxon.interface.crashhandler")

Member Typedef Documentation

◆  CallbackPtr

using CallbackPtr = void (*)(const CrashReportState & crashState)

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( CrashHandler   ,
MAXON_REFERENCE_NONE   ,
"net.maxon.interface.crashhandler"   
)
private

◆  SetCallback()

static MAXON_METHOD Bool SetCallback ( CallbackPtr   callback )
static

Sets a callback that will be invoked when a thread has crashed. Usually the callback should dump the register and callstack information and whatever else it deems important to a file. After the callback returns the application will usually quit.

参数
[in] callback Function to be invoked when a thread has crashed.
返回
True if crash handler callback was set, false if crash handling is disabled.

◆  SetSecondaryCallback()

static MAXON_METHOD Bool SetSecondaryCallback ( CallbackPtr   callback )
static

This callback is invoked after the primary crash callback and can be used to dump optional data, for example an OpenGL trace.

参数
[in] callback Function to be invoked when a thread has crashed.
返回
True if crash handler callback was set, false if crash handling is disabled.

◆  SetCrashDataDirectory()

static MAXON_METHOD Result <void> SetCrashDataDirectory ( const Url dataDirectory )
static

Sets a directory which is used to store crash relevant data, for example OS specific dumps, log files or recovered documents.

参数
[in] dataDirectory The path of a directory which will be used to store additional crash relevant data.
返回
OK on success.

◆  DisplayCrashDialog()

static MAXON_METHOD void DisplayCrashDialog ( const String title ,
const String message  
)
static

Displays a crash safe dialog with one button (OK).

参数
[in] title Dialog title.
[in] message Dialog text (use
to seperate lines).

◆  GetProcessModules()

static MAXON_METHOD Result <void> GetProcessModules ( WritableArrayInterface < CrashModuleEntry > &  modules )
static

This method is for diagnostic purposes. In a crash case using the generic ArrayInterface could be problematic.

参数
[out] modules Module informationDialog title.
返回
OK on success.

◆  ResolveBugReport()

static MAXON_METHOD Result <void> ResolveBugReport ( const Url report ,
const Url symbolFileArchives ,
const Url temporaryDir  
)
static

Resolves the addresses in a bug report and saves a file containing symbol and file information to the same location as the bug report. The symbol archive files are expected to be stored in a three level hierarchy. On the first level the directories have the (arbitrary) name of the branch and on the second level the arbitrary name must contain the build number of each corresponding build. On the third level is a directory named "builds" which contains a zip with the symbol file archive. The symbol file archive conforms to the naming scheme buildId plus "_dsym.zip" or "_pdb64.zip", for example "MA93302_dsym.izp" or "RC79244_pdb64.zip". If symbolFileArchives is empty the value of the configuration variable g_symbolArchiveFolder is used and if temporaryDir is empty g_symbolTemporaryFolder is used.

参数
[in] report The bug report file.
[in] symbolFileArchives The path of the symbolFileArchives.
[in] temporaryDir The path of a temporary directory to unpack the archives.
返回
OK on success.

◆  MAXON_OBSERVABLE_STATIC()

MAXON_OBSERVABLE_STATIC ( void  ,
ObservableCrashDataDirectory  ,
(const Url &dataDirectory)  ,
ObservableCombinerRunAllComponent   
)

Invokes the observer(s) with the url of the crash data directory.