This commit is contained in:
cdle
2023-06-03 08:33:33 +08:00
parent 0b7fc5f12a
commit a83dcb0157
3 changed files with 58 additions and 8 deletions
+7 -7
View File
@@ -416,13 +416,13 @@ func initPlugin(data string, uuid string) (*common.Function, error) {
var running func() bool
f := &common.Function{
Handle: func(s common.Sender) interface{} {
// defer func() {
// err := recover()
// if err != nil {
// console.Error("脚本错误:", err)
// s.Reply(fmt.Sprint(err))
// }
// }()
defer func() {
err := recover()
if err != nil {
console.Error("脚本错误:", err)
s.Reply(fmt.Sprint(err))
}
}()
if err2 != nil {
panic(err2)
}