crash

package
v3.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package crash implements a crash handler with configurable recovery actions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(actions ...RecoveryAction) *Handler

func (*Handler) AddRecoveryAction

func (h *Handler) AddRecoveryAction(action RecoveryAction) *Handler

func (*Handler) HandlePanic

func (h *Handler) HandlePanic(r interface{})

type RecoveryAction

type RecoveryAction func(interface{}) error

func ShowErrorNotification

func ShowErrorNotification(appName string) RecoveryAction

ShowErrorNotification shows a system notification that the app with the given appName has crashed. NOTE: Icons shouldn't be hardcoded.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL