✨ New StrictlyNegativeInt.Companion.create
function with custom message
#598
Closed
2 tasks
📝 Description
We would like to introduce an experimental
StrictlyNegativeInt.Companion.create
function for accepting a customized exception message.This function throws an
IllegalArgumentException
with the specifiedmessage
if the specifiednumber
is greater than or equals zero. If themessage
has a blank string representation, it throws the exception with a generic message instead.Here are some examples of calling this function from Kotlin code:
The
StrictlyNegativeInt
type being an inline value class, this function shouldn't be available yet for Java users.✅ Checklist
The text was updated successfully, but these errors were encountered: