bubble

package
Version: v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNeedle

func AddNeedle(n Needle)

AddNeedle to current list of needles - if not locked

func Explode

func Explode(bubble error) error

Explode iterates on all registered needles if the returned error is not nil, it means the needle found an error he could handle since we iterate with a simple loop on the needles, first appended needles are the first to be used

func Lock

func Lock()

Lock the possibility to add needles to the list should be used at the end of all needles instantiation

Types

type EchoNeedle

type EchoNeedle struct {
}

func (EchoNeedle) Explode

func (n EchoNeedle) Explode(err error) error

type Needle

type Needle interface {
	// Explode is a function testing all known needles in the giving box
	// it takes in argument the error that bubbled up.
	Explode(err error) error
}

Needle is a component able to transform a given error into a better one. The analysis of the input error is up to the implementation, as the final returned error is. The implementation shall return nil if the input error is unknown.

type PSQLNeedle

type PSQLNeedle struct {
}

func (PSQLNeedle) Explode

func (n PSQLNeedle) Explode(err error) error

type Validator10Needle added in v1.5.0

type Validator10Needle struct {
}

func (Validator10Needle) Explode added in v1.5.0

func (n Validator10Needle) Explode(err error) error

type ValidatorNeedle

type ValidatorNeedle struct {
}

func (ValidatorNeedle) Explode

func (n ValidatorNeedle) Explode(err error) error

Jump to

Keyboard shortcuts

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