This repository contains the crash handler used in Chatterino. The crash handler uses crashpad to capture exception information and restarts the application when a crash is captured.
The following annotations are used:
exePath
(required): an absolute path to the client executablecanRestart
(required): a boolean whether the handler should restart the client (true
orfalse
)startedAt
(required): a UTC timestamp in ISO 8601 when the client was startedexeArguments
(optional): an encoded argument string for the client executable. Spaces are encoded as '+' and a plus is escaped by another plus ('+' → '++').
In addition to the arguments specified in exeArguments
, the handler will start the client with the following arguments:
--crash-recovery
--cr-exception-code <code>
: the numeric, native, platform-specific code of the exception that occurred--cr-exception-message <message>
: text version of the exception code (potentially with more context)
This project is built with CMake. Currently, only Windows is supported. Run the following commands in a prompt with Visual Studio environment variables.
git clone --recurse-submodules https://github.com/Chatterino/crash-handler
cd crash-handler
cmake -G Ninja -B build
ninja -C build
The executable can be found in build/bin/crashpad/crashpad-handler.exe
.