fault

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catch

func Catch(err *error)

Catch recovers from a fault.Panic and assigns it to the provided error pointer. It re-panics if the recovered value is not a fault.Panic.

func Fail

func Fail(format string, args ...interface{})

Fail triggers a panic with a formatted message and a fresh stack trace.

Types

type Panic

type Panic struct {
	Err   error
	Stack []byte
}

Panic wraps an error with the stack trace captured at the moment of failure.

func (Panic) Error

func (p Panic) Error() string

Error implements the error interface, combining the message and stack.

func (Panic) Unwrap

func (p Panic) Unwrap() error

Unwrap allows standard library errors.Is/As to work.

Jump to

Keyboard shortcuts

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