MCPcopy Create free account
hub / github.com/Peithon/scLoader / checkError

Function checkError

core/error.go:5–15  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

3import "os"
4
5func checkError(err error) {
6 //如果内存调用出现错误,可以报错
7 if err != nil {
8 //如果调用dll系统发出警告,但是程序运行成功,则不进行警报
9 if err.Error() != "The operation completed successfully." {
10 //报出具体错误
11 println(err.Error())
12 os.Exit(1)
13 }
14 }
15}

Callers 1

CmdStartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected