exception

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

账户错误

业务异常

组件错误

Functions

func HandlingErrors

func HandlingErrors(err error) error

对错误做非空判断并返回

Types

type Exception

type Exception struct {
	Code    int
	Message string
}

错误结构体

func Account

func Account(message string) *Exception

func Business

func Business(message string) *Exception

func Service

func Service(message string) *Exception

func (*Exception) Error

func (e *Exception) Error() string

func (*Exception) StatusCode

func (e *Exception) StatusCode() int

Jump to

Keyboard shortcuts

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