exception

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exception

type Exception struct {
	Throwable
	// contains filtered or unexported fields
}

func New

func New(code int, message string, a ...any) *Exception

New 创建一个新的错误信息, 包含一个状态码和信息

func (Exception) Code

func (this Exception) Code() int

func (Exception) Error

func (this Exception) Error() string

格式化输出错误信息

type Throwable

type Throwable interface {
	error
	Code() int
}

Jump to

Keyboard shortcuts

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