Skip to content
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

Add helpful plugin errors #2691

Merged
merged 3 commits into from Mar 6, 2019

Conversation

rhurstdialpad
Copy link
Contributor

@rhurstdialpad rhurstdialpad commented Feb 27, 2019

↪️ Pull Request

This PR adds helpful errors when Parcel plugins throw exceptions. Instead of silently failing, then producing a missing dependency error, a warning is printed explaining what error was thrown by the plugin or one of its parsers.

One question still remains. Should this be a warning as I have implemented here, or should parcel's main process re-throw the error from the plugin. The latter would involve capturing the error in the parcel worker and stopping all other work, passing it up to the main process, then finally throwing.

This makes plugin development much easier as prior to this change it was impossible to see plugin errors.

The following error occured because I deleted parcel-bundler from the plugin's node_modules folder:
screen shot 2019-02-26 at 6 40 07 pm

@rhurstdialpad rhurstdialpad force-pushed the plugin-errors branch 9 times, most recently from 8725eeb to f3427a6 Compare February 27, 2019 05:08
@DeMoorJasper
Copy link
Member

Probably an error as parcel uses errors as well for failed parsing or requires

Sent with GitHawk

@devongovett devongovett merged commit bec96be into parcel-bundler:master Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants