2 Star 1 Fork 2

go-mao/mao

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.vscode
demo/app
frame
libs
binding
config
crontab
httplib
secret_api
try
exception.go
throw.go
try.go
try_test.go
types
utils
.gitignore
LICENSE
README.MD
const.go
embed.go
go.mod
go.sum
main.go
make.sh
克隆/下载
throw.go 299 Bytes
一键复制 编辑 原始数据 按行查看 历史
haitgo 提交于 2年前 . v1.0.0
package try
import "fmt"
// 抛出异常
func Throw(code int32, args ...any) {
panic(&BaseException{code: code, msg: fmt.Sprint(args...)})
}
// 抛出异常并格式化
func Throwf(code int32, format string, args ...any) {
panic(&BaseException{code: code, msg: fmt.Sprintf(format, args...)})
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/go-mao/mao.git
git@gitee.com:go-mao/mao.git
go-mao
mao
mao
v1.0.15

搜索帮助