Skip to content

fix(registerplugin): better error on type#225

Merged
SanderElias merged 2 commits intomasterfrom
sander/betterErrorOnRegister
Jan 23, 2020
Merged

fix(registerplugin): better error on type#225
SanderElias merged 2 commits intomasterfrom
sander/betterErrorOnRegister

Conversation

@SanderElias
Copy link
Copy Markdown
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