Closed zshoals closed 2 years ago
As an update, I believe this was caused by Haxe 4.1 and its exception changes. I bandaided this locally in the error handler by typing error as a haxe.Exception, which actually seems to work and get the stack trace to print out properly. Problem is that js.lib.Errors can also be thrown (which aren't Exceptions), and I could not get the error handler to handle both those and Exceptions simultaneously. Trying to cast things just resulted in empty stack fields.
Maybe you know how to do it properly, or if you don't care about js.lib.Error then error: haxe.Exception is sufficient here, which probably covers the common case?
Handling both would be cool, I'll have a look.
No, it's not.
Throwing an error is resulting in "undefined" instead of the stack trace because error.stack is null for some reason at this point on Electron:
https://github.com/Kode/Kha/blob/5e72acda31d454ad214157f3d3a694eb9c5cf083/Backends/HTML5/kha/SystemImpl.hx#L59-L62
This is with Kha and all submodules updated. I am fairly certain everything was working awhile ago but it's been quite a bit since I've thrown an error.