crash

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2017 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)

Register adds r to the list of functions that gets called when an uncaught panic is thrown.

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.

Jump to

Keyboard shortcuts

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