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

Unhelpful NSEE from namesToValuesMap #254

Open
halfninja opened this issue Sep 24, 2019 · 1 comment
Open

Unhelpful NSEE from namesToValuesMap #254

halfninja opened this issue Sep 24, 2019 · 1 comment

Comments

@halfninja
Copy link

Passing an invalid name to namesToValuesMap returns an unhelpful NoSuchElementException with no message to indicate what the invalid value was

> domain.DocType.namesToValuesMap("Greg")
java.util.NoSuchElementException
  at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:569)
  at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
  ... 36 elided

Compare to withName which gives a much nicer message, but this doesn't help as enumeratum-slick uses namesToValuesMap, so you could optionally consider this as a bug in SlickEnumColumnSupport.

@lloydmeta
Copy link
Owner

Yeah, the SlickEnumColumnSupport can def be improved. Please feel free to send a PR.

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

No branches or pull requests

2 participants