exception

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorParser

type ErrorParser func(err error, code int, skipTrace int) *StandardException

type Exception

type Exception interface {
	error
	Code() int
	File() string
	Line() int
	Traces() []Trace
}

type HttpException

type HttpException interface {
	Exception
	StatusCode() int
	Headers() map[string]string
}

type StandardException

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

func GoErrorParser

func GoErrorParser(err error, code int, skipTrace int) *StandardException

func NewException

func NewException(message string, code int) *StandardException

func NewExceptionFromError

func NewExceptionFromError(err error, code int) *StandardException

func (*StandardException) Code

func (e *StandardException) Code() int

func (*StandardException) Error

func (e *StandardException) Error() string

func (*StandardException) File

func (e *StandardException) File() string

func (*StandardException) Line

func (e *StandardException) Line() int

func (*StandardException) Traces

func (e *StandardException) Traces() []Trace

type StandardHttpException

type StandardHttpException struct {
	*StandardException
	// contains filtered or unexported fields
}

func NewHttpException

func NewHttpException(message string, statusCode int, code int, headers map[string]string) *StandardHttpException

func NewHttpExceptionFromError

func NewHttpExceptionFromError(err error, statusCode int, code int, headers map[string]string) *StandardHttpException

func (*StandardHttpException) Headers

func (s *StandardHttpException) Headers() map[string]string

func (*StandardHttpException) StatusCode

func (s *StandardHttpException) StatusCode() int

type StandardTrace

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

func (*StandardTrace) File

func (t *StandardTrace) File() string

func (*StandardTrace) Line

func (t *StandardTrace) Line() int

func (*StandardTrace) Name

func (t *StandardTrace) Name() string

type Trace

type Trace interface {
	File() string
	Line() int
	Name() string
}

func GoErrorTraceParser

func GoErrorTraceParser(err error, skip int) []Trace

type TraceParser

type TraceParser func(err error, skip int) []Trace

Jump to

Keyboard shortcuts

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