Skip to content

ElectronCrashReporter

Unofficial

Electron CrashReporter for submitting crash reports to a remote server.

Import:

import type { ElectronCrashReporter } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface ElectronCrashReporter

Methods

Method Returns Description
addExtraParameter(key, value) void Sets an extra parameter to be sent with the crash report. The values specified here will be sent in addition to any values set via the extra option when start was called. Parameters added in this fashion are specific to the calling process.
getLastCrashReport() ElectronCrashReport Returns the date and ID of the last crash report. Only crash reports that have been uploaded will be returned; even if a crash report is present on disk it will not be returned until it is uploaded.
getParameters() Record<string, string> Returns the current extra parameters of the crash reporter.
getUploadedReports() ElectronCrashReport[] Returns all uploaded crash reports. Each report contains the date and uploaded ID.
getUploadToServer() boolean Returns whether reports should be submitted to the server. Set through the start method or setUploadToServer.
removeExtraParameter(key) void Removes an extra parameter from the current set of parameters. Future crashes will not include this parameter.
setUploadToServer(uploadToServer) void Sets whether reports should be submitted to the server. This would normally be controlled by user preferences. This has no effect if called before start is called.
start(options) void Initializes the crash reporter. This method must be called before using any other crashReporter APIs. Once initialized, the crashpad handler collects crashes from all subsequently created processes.

Links to this page: