e

package
v0.0.0-...-7de0bc6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Failf

func Failf(klass int, innerError error, message string, args ...interface{})

Failf panics with a wrapped E containing an interpolated message

Types

type E

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

E is a container for errors. In addition to the standard error message, it also contains the stack trace and a few other important attributes.

func NewError

func NewError(klass int, message string) *E

NewError creates a new E

func NewErrorf

func NewErrorf(klass int, message string, args ...interface{}) *E

NewErrorf creates a new E with an interpolated message

func Wrap

func Wrap(klass int, innerError error) *E

Wrap creates a new E that wraps another error

func Wrapf

func Wrapf(klass int, innerError error, message string, args ...interface{}) *E

Wrapf creates a new wrapped E with an interpolated message

func (*E) Class

func (e *E) Class() int

Class returns the class of this error.

func (*E) Error

func (e *E) Error() string

func (*E) InnerError

func (e *E) InnerError() error

InnerError returns the inner error wrapped in this error if there's one.

func (*E) Stack

func (e *E) Stack() []runtime.Frame

Stack returns the callstack (up to 32 frames) indicating where the error occurred

func (*E) WithExtendedInfo

func (e *E) WithExtendedInfo() *E

WithExtendedInfo returns a new instance of E which prints the additional details such as callstack.

Jump to

Keyboard shortcuts

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