error By Null Predicate
Content copied to clipboard
Predicate an error if NULL, based on the return value of the POSIX function. Usually those functions are supposed to return a valid pointer.
Receiver
Return
On success returns presumably a pointer as a Long.
Parameters
msg
Describing the action that may go wrong.
predicate
Lambda carrying out the POSIX operation.
inline fun <E : RuntimeException> errorByNullPredicate(predicate: Long, handler: (it: PosixError) -> E): Long
Content copied to clipboard
inline fun <E : RuntimeException> errorByNullPredicate(predicate: Int, handler: (it: PosixError) -> E): Int
Content copied to clipboard
Predicate an error if NULL, based on the return value of the POSIX function. Usually those functions are supposed to return a valid pointer.
Receiver
Return
The predicate.
Parameters
E
Generic exception to be turned to the error method.
predicate
Predicate to be examined.
handler
Lambda that build eventual exeption to be thrown.