Hi!
While injecting a golang function into a js runtime how to throw an error js way within this function
e.g.
runtime := goja.New()
runtime.Set("aFunc", func() {
// how to throw an error here
})
runtime.RunString(`
try {
aFunc()
} catch (error) {
// so that to be able to catch it over here
}
`)
Hi! While injecting a golang function into a js runtime how to throw an error js way within this function e.g.
Thx.