refined icon indicating copy to clipboard operation
refined copied to clipboard

Add special exception for RefinePartiallyApplied.force

Open fthomas opened this issue 8 years ago • 1 comments

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.

fthomas avatar Dec 01 '15 19:12 fthomas

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 :-)

fthomas avatar Dec 14 '15 21:12 fthomas