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

Throw BuidlerPluginError instead of Error #527

Closed
fvictorio opened this issue Jul 29, 2020 · 1 comment
Closed

Throw BuidlerPluginError instead of Error #527

fvictorio opened this issue Jul 29, 2020 · 1 comment

Comments

@fvictorio
Copy link
Collaborator

Instead of:

    if (process.exitCode > 0) throw new Error(ui.generate('tests-fail', [process.exitCode]));

consider doing

    if (process.exitCode > 0) throw new BuidlerPluginError('solidity-coverage', ui.generate('tests-fail', [process.exitCode]));

Relevant section in the docs: https://buidler.dev/advanced/building-plugins.html#throwing-errors-from-your-plugins

@cgewecke
Copy link
Member

This is fixed for the Hardhat plugin in 0.7.12. Thanks for highlighting @fvictorio!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants