errors

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errors provides implementations of custom errors for the echo framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPError

type HTTPError struct {
	Code        int
	Cause       error
	Message     string
	Description interface{}
}

HTTPError represents an error that occurred while handling a request.

func New

func New(code int, message ...string) *HTTPError

New creates a new HTTPError instance.

func Wrap

func Wrap(code int, err error, message ...string) *HTTPError

Wrap creates a new HTTPError instance with wrap origin error.

func (*HTTPError) Error

func (e *HTTPError) Error() string

Error makes it compatible with `error` interface.

Jump to

Keyboard shortcuts

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