Documentation
¶
Overview ¶
Package errors 公用的错误信息
Index ¶
Constants ¶
View Source
const ( SyntaxError int8 = iota + 1 SyntaxWarn Other )
错误分类
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { LocaleError Type int8 File string Line int Field string // contains filtered or unexported fields }
Error 错误信息
type HandlerFunc ¶
type HandlerFunc func(err *Error)
HandlerFunc 错误处理函数
func NewLogHandlerFunc ¶
func NewLogHandlerFunc(errolog, warnlog *log.Logger) HandlerFunc
NewLogHandlerFunc 生成一个将错误信息输出到日志的 HandlerFunc
该实例仅仅是将语法错误和语法警告信息输出到指定的日志通道。
type LocaleError ¶
LocaleError 本地化的错误信息
func (*LocaleError) Error ¶
func (err *LocaleError) Error() string
Click to show internal directories.
Click to hide internal directories.