[quickjs-devel] Error stack not available outside of catch block

  • From: Saúl Ibarra Corretgé <s@xxxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Fri, 6 Sep 2019 08:30:13 +0200

Hey there,

Not sure what the rule is, but I tested v8, chakra, spidermonkey and jsc
(https://github.com/GoogleChromeLabs/jsvu it's really awesome for this)
and they all set the error stack when the error object is created.
QuickJS OTOH, sets it as undefined until the error is thrown.

It's easy to workaround, but I think it breaks user expectations, as
creating a new error just to get the stack is commonly used to implement
console.trace, for example.


Cheers,

-- 
Saúl

Other related posts: