libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
crashhandlerbridge.h File Reference
#include <stddef.h>
#include "ship/Api.h"
#include <memory>
Include dependency graph for crashhandlerbridge.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Ship
 Core namespace for the libultraship engine framework.
 

Typedefs

typedef void(* CrashHandlerCallback) (char *, size_t *)
 Callback type invoked by the crash handler when a crash is detected.
 

Functions

void CrashHandlerSetComponent (std::shared_ptr< Ship::CrashHandler > crashHandler)
 
std::shared_ptr< Ship::CrashHandlerCrashHandlerGetComponent ()
 
API_EXPORT void CrashHandlerRegisterCallback (CrashHandlerCallback callback)
 Registers an application callback to be invoked on crash.
 

Typedef Documentation

◆ CrashHandlerCallback

typedef void(* CrashHandlerCallback) (char *, size_t *)

Callback type invoked by the crash handler when a crash is detected.

The callback receives a mutable character buffer (char*) and the current write offset within that buffer (size_t*). Implementations should append any game-specific crash context and update the offset accordingly.

Function Documentation

◆ CrashHandlerGetComponent()

std::shared_ptr< Ship::CrashHandler > CrashHandlerGetComponent ( )

◆ CrashHandlerRegisterCallback()

API_EXPORT void CrashHandlerRegisterCallback ( CrashHandlerCallback  callback)

Registers an application callback to be invoked on crash.

The callback is called after the CrashHandler has written the platform crash report, giving the application an opportunity to append additional information (e.g. current game state) before the process exits.

Parameters
callbackFunction to invoke on crash. Pass nullptr to clear the callback.

◆ CrashHandlerSetComponent()

void CrashHandlerSetComponent ( std::shared_ptr< Ship::CrashHandler crashHandler)