errutil

package
v0.0.0-...-a214d60 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Packags errutil 提供错误的增强功能

Index

Constants

This section is empty.

Variables

View Source
var CompileErr = "编译器错误:"

CompileErr 表示编译器错误

View Source
var UnknownSymbol = "未知的符号"

UnknownSymbol 表示未知的符号错误

View Source
var UnknownType = "未知的类型"

UnknownType 表示未知的类型错误

Functions

func IsCompileErr

func IsCompileErr(err error) bool

IsCompileErr 返回是否是一个编译器错误

func IsUnknownSymbol

func IsUnknownSymbol(err interface{}) (string, bool)

IsUnknownSymbol 返回是否是一个变量不存在错误,以及变量名(如果有) 实现假设 参数err如果类型是Err2,msg字段是变量名

func IsUnknownType

func IsUnknownType(err interface{}) (string, bool)

IsUnknownType 返回是否是一个类型不存在错误,以及变量名(如果有) 实现假设 参数err如果类型是Err2,msg字段是类型名

Types

type Err2

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

Err2 是由错误类型和描述信息组成的错误

func NewErr2

func NewErr2(typ string, msg string) Err2

func (Err2) Error

func (err Err2) Error() string

Jump to

Keyboard shortcuts

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