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

fix(registerplugin): better error on type #225

Merged
merged 2 commits into from
Jan 23, 2020

Conversation

SanderElias
Copy link
Contributor

When given the wrong type for a plugin, throw a proper explaination.

closes #219

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Other... Please describe:

What is the current behavior?

The current error message isn't explanatory enough

What is the new behavior?

throw an error like this:

--------------
  Type "tourer" is not a known plugin type for registering plugin "myPluginName".
  The first parameter of registerPlugin needs to be one of: 'fileHandler', 'router', 'render'
--------------

Does this PR introduce a breaking change?

  • Yes
  • No

When given the wrong type for a plugin, throw a proper explaination.

closes #219
@SanderElias SanderElias merged commit 99c0253 into master Jan 23, 2020
@SanderElias SanderElias deleted the sander/betterErrorOnRegister branch January 23, 2020 13:15
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.

Better error when registering plugin of the wrong type.
2 participants