This commit is contained in:
cdle
2023-06-02 10:46:18 +08:00
parent 0432c2505b
commit 95c39869a6
11 changed files with 354 additions and 74 deletions
+8 -7
View File
@@ -204,6 +204,7 @@ func initPlugins() {
CancelPluginCrons(key)
CancelPluginWebs(key)
CancelPluginlistening(key)
CancelHttpListen(key)
storage.DisableHandle(key)
if new != "" {
AddCommand([]*common.Function{f})
@@ -415,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)
}