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.
Passing an invalid name to
namesToValuesMap
returns an unhelpful NoSuchElementException with no message to indicate what the invalid value wasCompare to
withName
which gives a much nicer message, but this doesn't help asenumeratum-slick
usesnamesToValuesMap
, so you could optionally consider this as a bug inSlickEnumColumnSupport
.