Open daemianmack opened 6 years ago
@daemianmack There is no facility in Planck itself. I wonder if there is a JavaScriptCore equivalent to your example above. Failing that, I suspect we could add something somewhere to catch things. Does this tend to occur with callbacks or core.async
?
Not currently in pursuit of any particular use-case; at the moment I'm making do with a top-level try
/catch
but was curious if there was another option.
@daemianmack Cool. A while back, I made some improvements to ensure that if you run a script, and it fails by throwing, then Planck will itself report the exception. Perhaps this covers the main concern. I'd be curious to know if you actually need your top-level try
/ catch
and if Planck's inherent reporting works in your case.
In this case we want to do some cleanup as part of the catch
, so it needs to be custom. Definitely appreciate the auto-throw though. :)
Hey, I'm curious if Planck allows defining a global uncaught exception handler?
e.g. in Lumo I would do something like this...