-
Notifications
You must be signed in to change notification settings - Fork 58
Error in Haskell code seems to leave JS promise hanging #579
Comments
Thanks for reporting. I confirmed locally with a smaller case that hangs |
Could you give the |
I gave it a try, valid inputs still work as expected, for invalid inputs, it triggers the catch now as expected, but the err argument passed into the callback is undefined, so I don't get the data from the error. It logs |
Yes, that's expected, since for now the mitigation only ensures that the Let's keep this issue open for now; |
Alright, that sounds good, I only have one kind of error (although it reports the state when the error happened), so I can just not report the state that triggered it for now. Switching to Asterius is still worth it imo, especially because of Haste's stack overflow bug which is common in large programs. My one reservation is that when I call the FFI export, the webworker spends about ~40% of the time idling during the computation (I guess because of the scheduler stuff). I want Asterius to just slam the CPU at 100% inside my webworker. If it can do that, its performance will roughly match Haste. Is there a way to configure Asterius like that? |
Closed by #628. Thanks again for reporting this one :) |
Hey, I'm back with another go at porting my FRACTRAN thing to Asterius.
Describe the bug
An uncaught error triggered in Haskell code doesn't trigger the
Promise.catch()
callback (simple usage seen here)To Reproduce
Call FFI foreign export function from JS with input that triggers an uncaught error
Expected behavior
Promise.catch()
callback is called with a failure (instead, neither try nor catch callback is called)Environment
Additional context
This is running in a web worker to avoid hanging the UI thread.
The text was updated successfully, but these errors were encountered: