ref: 900ecca8a7356d55faef6990f9191a6b2a9c9fd9
parent: 7122c8829560b74e25f92079c6ea0e8576b31738
author: Philip Silva <philip.silva@protonmail.com>
date: Fri Mar 5 12:03:02 EST 2021
recover callback in xhr function
--- a/domino/domino.go
+++ b/domino/domino.go
@@ -475,6 +475,11 @@
return
}
d.loop.RunOnLoop(func(*goja.Runtime) {
+ defer func() {
+ if r := recover(); r != nil {
+ log.Errorf("recovered in xhr: %v", r)
+ }
+ }()
cb(string(bs), "")
})
}()