dontpanic

package
v2.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package dontpanic provides utilities to recover from panics and convert them to error values.

Index

Constants

This section is empty.

Variables

View Source
var ErrPanic = errors.New("recovered from panic")

Functions

func RecoverTo

func RecoverTo(err *error)

RecoverTo recovers from a panic and sets a ErrPanic to the given pointer. if the panic value is an error, it will be wrapped, caller can use errors.Is to check the underlying error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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