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

Misspelled plugin name causes confusing exception #132

Closed
solnic opened this issue Dec 23, 2019 · 0 comments · Fixed by #135
Closed

Misspelled plugin name causes confusing exception #132

solnic opened this issue Dec 23, 2019 · 0 comments · Fixed by #135

Comments

@solnic
Copy link
Member

solnic commented Dec 23, 2019

Describe the bug

When a plugin name is misspelled, you'll end up with a confusing exception.

To Reproduce

class MyContainer < Dry::System::Container
  use :roargh
end

Results in:

NoMethodError:
  undefined method `load_dependencies' for nil:NilClass
# .gem/ruby/2.4.1/gems/dry-system-0.12.0/lib/dry/system/plugins.rb:86:in `use'

Expected behavior

A meaningful error should be raised saying "Plugin :roargh does not exist"

solnic added a commit that referenced this issue Jan 19, 2020
[changelog]

fixed:
- "Misspelled plugin name raises meaningful error (issue #132) (@cgeorgii)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant