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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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