panicsafe

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Defered

func Defered(retErr *error)

func Func

func Func(f func() error) func() error

func Recover

func Recover(f func() error) (retErr error)

func Recover2

func Recover2[T any](f func() (T, error)) (ret T, retErr error)

func Recover3

func Recover3[T1 any, T2 any](f func() (T1, T2, error)) (ret1 T1, ret2 T2, retErr error)

Types

type PanicError

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

func NewPanicError

func NewPanicError(v interface{}, stack []byte) *PanicError

func (*PanicError) Error

func (e *PanicError) Error() string

Jump to

Keyboard shortcuts

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