errors

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorEmptyLogger = errors.New("options hasn't logger")
)

Functions

This section is empty.

Types

type Logic

type Logic struct {
	Opts Options
}

func New

func New(opts Options) (*Logic, error)

func (*Logic) Capture

func (c *Logic) Capture(err error, ctx echo.Context)

func (*Logic) Recover

func (c *Logic) Recover() echo.MiddlewareFunc

type LogicError

type LogicError struct {
	Code    int
	Message string
}

func NewError

func NewError(code int, message string) *LogicError

func NewErrorf

func NewErrorf(code int, format string, a ...interface{}) *LogicError

func (*LogicError) Error

func (err *LogicError) Error() string

type Options

type Options struct {
	Debug  bool
	Logger logger.Logger
}

type Response

type Response struct {
	Error  string   `json:"error"`
	Stack  []string `json:"stack"`
	Result []string `json:"result"`
}

Jump to

Keyboard shortcuts

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