Closed asbng closed 2 months ago
We should consider that that might collide with "unhandledrejection" https://github.com/unyt-org/datex-core-js-legacy/blob/0e3224c02692cd9f10e84e6b4342e2aa9a146dc9/init.ts#L22
Indeed, this will definitely be problematic as the current implementation in this PR exits Deno immediately whereas the unhandledrejection
handler in datex-core-legacy initiates asynchronous work. We might want to somehow integrate / unify the solutions with each other.
Also, https://github.com/unyt-org/datex-core-js-legacy/blob/0e3224c02692cd9f10e84e6b4342e2aa9a146dc9/init.ts#L26 should not be executed when the UIX CLI encounters an error as it performs error presentation on its own.
They added a fix for the websocket exception in May (https://github.com/denoland/deno/pull/21849), not sure if there are any other promise rejections that cannot be handled, but I think we can remove the unhandledrejection
handler for now.
I hooked up error reporting via sendReport()
from datex-core-legacy
. This will only work correctly, however, once unyt-org/datex-core-js-legacy#107 is addressed.
This Pull Request implements first measures to advance with #144.
The changes improve error presentation and readability for UIX users. Common errors and possible solutions can be represented by throwing
KnownError
s as defined insrc/types/errors.ts
.