refined
refined copied to clipboard
Add special exception for RefinePartiallyApplied.force
RefinePartiallyApplied.force currently throws an IllegalArgumentException if the argument does not conform to the predicate. We should probably introduce a special exception type (which can be a subtype of IllegalArgumentException) that also carries the result of Validate.validate.
BTW: a special exception for failed refinements can be observed in the wild: https://github.com/advancedtelematic/rvi_sota_server/blob/97d641d22a7d89ff4901040f6c35e560b6da1964/common/src/main/scala/org/genivi/sota/marshalling/RefinmentError.scala :-)