package
Version:
v0.3.6
Opens a new window with list of versions in this module.
Published: Apr 17, 2024
License: BSD-3-Clause-Clear
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
自定义错误处理包,支持记录错误的发生我位置、发生行数等信息
新建错误消息-带参数格式化形式
msg 错误消息
param 传入参数
将error错误信息转换为xerror.XError对象,便于更加完善的错误记录
自动判定,如果err为xerror.XError对象,则会直接将err进行返回,并不会做进一步封装
err 待转换的错误对象
type XError struct {
File string `json:"file" form:"file"`
Line int `json:"line" form:"line"`
Errors string `json:"errors" form:"errors"`
}
定义错误结构体,此结构体直接使用F公共变量,以便使用时直接调用,而不需要再行获取
Source Files
¶
Click to show internal directories.
Click to hide internal directories.