Skip to content

feat(swc/common): implement PluginError #3300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 18, 2022

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Jan 18, 2022

Description:

This PR introduces priliminary error handling story from plugin to the host (SWC). Given plugin runs under wasm runtime, we don't have transparent way to just pass through error to the host. PR introduces simple enum to wraps up possible errors which can be serialized / deserialized into, then host catches it up and bubble up as needed.

The list of possible PluginError is incomplete. It should be expanded over actual usecase & feedback.

Related issue (if exists):

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work!

@kdy1 kdy1 merged commit c6ffdc8 into swc-project:main Jan 18, 2022
@kdy1 kdy1 added this to the v2.0.0-alpha.1 milestone Jan 18, 2022
@kwonoj kwonoj deleted the feat-plugin-error branch January 18, 2022 03:31
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants