fork-handles / forkhandles

Foundational libraries for Kotlin
https://forkhandles.dev
Apache License 2.0
224 stars 28 forks source link

[values4k] Forced message in factory #47

Open tkint opened 1 year ago

tkint commented 1 year ago

Hello !

I was wondering, what is the purpose of forcing the message ?

https://github.com/fork-handles/forkhandles/blob/a7663a3649906d10361ece66f6dfa314955b9475/values4k/src/main/kotlin/dev/forkhandles/values/ValueFactory.kt#L28-L36

Why not let the client decide what to do with exceptions ?

In my case, I want to throw exceptions in the init of the class, by giving meaningful descriptions. Unfortunately, it gets messed up by this forced behavior.