first commit

This commit is contained in:
2026-02-17 13:06:23 +08:00
commit 7cbd3d061d
349 changed files with 126558 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package wxcore
import (
"fmt"
"time"
)
// 异常处理
func TryE(userName string) {
errs := recover()
if errs == nil {
return
}
now := time.Now() //获取当前时间
timeFormat := now.Format("2006-01-02 15:04:05") //设定时间格式
fileName := fmt.Sprintf("[%s]-%s-%vrn", userName, timeFormat, errs) //保存错误信息文件名:程序名-进程ID-当前时间(年月日时分秒)
fmt.Println("error: ", fileName)
}