We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4422dae commit 963b42aCopy full SHA for 963b42a
wasm/main.go
@@ -23,6 +23,7 @@ package main
23
24
import (
25
"fmt"
26
+ "runtime/debug"
27
"syscall/js"
28
29
"github.com/elastic/ottl-playground/wasm/internal"
@@ -34,7 +35,7 @@ func handlePanic() {
34
35
}()
36
if r := recover(); r != nil {
37
js.Global().Call("wasmPanicHandler", fmt.Sprintf("An error occurred in the WASM module: %v", r))
- js.Global().Get("console").Call("error", "stack trace:", js.Global().Get("Error").New().Get("stack").String())
38
+ js.Global().Get("console").Call("error", fmt.Sprintf("[WASM] %v %s", r, string(debug.Stack())))
39
}
40
41
0 commit comments