error By Minus One Predicate
inline fun errorByMinusOnePredicate(msg: String, predicate: () -> Int): Int
Content copied to clipboard
Predicate an error if -1, based on the return value of the POSIX function. Usually those functions are supposed to return zero or positive value but -1 indicate error.
Receiver
Return
On success returns the result as an Int.
Parameters
msg
Describing the action that may go wrong.
predicate
Lambda carrying out the POSIX operation.