exception

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 1 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicIgnore

func PanicIgnore()

PanicIgnore 忽略panic, 继续执行

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