Package org.angproj.io.err

Types

Link copied to clipboard
abstract class AbstractError

Abstract base class for error handling.

Link copied to clipboard
enum ErrName : Enum<ErrName>

Enumeration of all POSIX error names.

Link copied to clipboard
expect class Error : AbstractError

Static error handling class, temporary holding every error and errno, to be passed from the underlying POSIX system.

actual class Error : AbstractError

The Kotlin/JS implementation of the Error class never returns any errors. Only simulates to do that.

actual class Error : AbstractError

The Kotlin/JVM receive errors and preform resets by using the JNI interface.

actual class Error : AbstractError

The Kotlin/Native receive errors and perform resets by using c-interop.

Link copied to clipboard
class PosixError(message: String, val errName: ErrName) : RuntimeException

PosixError exception that is based on RuntimeException.

Link copied to clipboard
class UnsupportedErrnoException(message: String) : RuntimeException

Used to tell that the underlying POSIX implementation doesn't properly support a certain ERRNO.

Functions

Link copied to clipboard
inline fun errorByMinusOnePredicate(msg: String, predicate: () -> Int): Int

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.

Link copied to clipboard
inline fun errorByNonZeroPredicate(msg: String, predicate: () -> Long): Long

Predicate an error if more than 0, based on the return value of the POSIX function. Usually those functions are supposed to return zero or an error.

Link copied to clipboard
inline fun errorByNullPredicate(msg: String, predicate: () -> Long): Long

Predicate an error if NULL, based on the return value of the POSIX function. Usually those functions are supposed to return a valid pointer.