crash

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 2 Imported by: 181

Documentation

Overview

Package crash provides functions for reporting application crashes (uncaught panics).

crash does not offer any sort of global crash recovery mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crash

func Crash(e interface{})

Crash invokes each of the registered crash reporters with e, then panics with e.

func Go

func Go(f func())

Go calls f on a new go-routine, reporting any uncaught panics to the registered crash handlers.

func Register

func Register(r Reporter) func()

Register adds r to the list of functions that gets called when an uncaught panic is thrown. Register returns a function that can be used to unregister the listener.

Types

type Reporter

type Reporter func(e interface{}, s stacktrace.Callstack)

Reporter is a function that reports an uncaught panic that will crash the application.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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