Package-level declarations

Types

Link copied to clipboard
class CancelException(str: String = "Cancel") : Exception

Exception representing a Cancel error

Link copied to clipboard
fun interface Cancellable
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class DeprecatedException(str: String = "Deprecated") : Exception

Exception representing a Must Implement error

Link copied to clipboard
Link copied to clipboard
interface EnumLike<T : EnumLike<T>>

A common interface for enums and enum-like classes.

Link copied to clipboard
interface Environment

Interface for Environment variables, that can be mocked for testing purposes.

Link copied to clipboard
open class EnvironmentCustom(customEnvironments: Map<String, String> = LinkedHashMap()) : Environment

A custom implementation of Environment that allows to set custom environment variables.

Link copied to clipboard
expect open class EOFException(msg: String) : IOException

Exception representing an EOF I/O error, that is a typealias in the case of the JVM

actual open class EOFException(msg: String) : IOException

Exception representing an EOF I/O error, that is a typealias in the case of the JVM

Exception representing an EOF I/O error, that is a typealias in the case of the JVM

actual open class EOFException(msg: String) : IOException

Exception representing an EOF I/O error, that is a typealias in the case of the JVM

actual open class EOFException(msg: String) : IOException

Exception representing an EOF I/O error, that is a typealias in the case of the JVM

Link copied to clipboard

Exception representing that a File Already Exists

Link copied to clipboard
expect open class FileNotFoundException(msg: String) : IOException

Exception representing a File Not Found I/O error, that is a typealias in the case of the JVM

actual open class FileNotFoundException(msg: String) : IOException

Exception representing a File Not Found I/O error, that is a typealias in the case of the JVM

Exception representing a File Not Found I/O error, that is a typealias in the case of the JVM

actual open class FileNotFoundException(msg: String) : IOException

Exception representing a File Not Found I/O error, that is a typealias in the case of the JVM

actual open class FileNotFoundException(msg: String) : IOException

Exception representing a File Not Found I/O error, that is a typealias in the case of the JVM

Link copied to clipboard
class InternalException(val code: Int) : Exception

Exception representing an Internal error

Link copied to clipboard

Typealias of IllegalArgumentException

Link copied to clipboard
class InvalidOperationException(str: String = "Invalid Operation") : Exception

Exception representing an Invalid Operation

Link copied to clipboard
expect open class IOException(msg: String) : Exception

Exception representing an I/O error, that is a typealias in the case of the JVM

actual open class IOException(msg: String) : Exception

Exception representing an I/O error, that is a typealias in the case of the JVM

actual typealias IOException = java.io.IOException

Exception representing an I/O error, that is a typealias in the case of the JVM

actual open class IOException(msg: String) : Exception

Exception representing an I/O error, that is a typealias in the case of the JVM

actual open class IOException(msg: String) : Exception

Exception representing an I/O error, that is a typealias in the case of the JVM

Link copied to clipboard
class KeyNotFoundException(str: String = "Key Not Found") : Exception

Exception representing a Key Not Found error

Link copied to clipboard

Exception representing Malformed Input

Link copied to clipboard
class MustOverrideException(str: String = "Must Override") : Exception

Exception representing a Must Override error

Link copied to clipboard
class MustValidateCodeException(str: String = "Must Validate Code") : Exception

Exception representing a Must Validate Code error

Link copied to clipboard
class NotImplementedException(str: String = "Not Implemented") : Exception

Exception representing a Value Not Found error

Link copied to clipboard
Link copied to clipboard
class OutOfBoundsException(index: Int = -1, str: String = "Out Of Bounds") : Exception

Exception representing an Out of Bounds error

Link copied to clipboard
class ReservedException(str: String = "Reserved") : Exception

Exception representing a Reserved error

Link copied to clipboard
class UnexpectedException(str: String = "Unexpected") : Exception

Exception representing a Unexpected error

Link copied to clipboard
class UnreachableException(str: String = "Unreachable") : Exception

Exception representing an Unreachable error

Properties

Link copied to clipboard

Shortcut for throwing a MustValidateCodeException

Link copied to clipboard
Link copied to clipboard

Shortcut for throwing a InvalidArgumentException

Link copied to clipboard

Shortcut for throwing a InvalidOperationException

Link copied to clipboard

Shortcut for throwing a MustValidateCodeException

Link copied to clipboard

Shortcut for throwing a InvalidOperationException

Link copied to clipboard

Like KClass.simpleName but guaranteed to work on all the targets. Returns the simple name of the class in a portable way.

Like KClass.simpleName but guaranteed to work on all the targets. Returns the simple name of the class in a portable way.

Like KClass.simpleName but guaranteed to work on all the targets. Returns the simple name of the class in a portable way.

Like KClass.simpleName but guaranteed to work on all the targets. Returns the simple name of the class in a portable way.

Like KClass.simpleName but guaranteed to work on all the targets. Returns the simple name of the class in a portable way.

Link copied to clipboard

Shortcut for throwing a ReservedException

Link copied to clipboard
Link copied to clipboard

Returns the TEMP folder of the system based on this Environment variables (that could be mocked)

Link copied to clipboard

Shortcut for throwing a UnreachableException

Link copied to clipboard

Returns the HOME path for the user executing this program based on the Environment variables (that could be mocked)

Functions

Link copied to clipboard
fun AutoCloseable(block: () -> Unit): AutoCloseable
Link copied to clipboard
fun Iterable<Cancellable>.cancel(e: Throwable = CancellationException(""))
Link copied to clipboard
Link copied to clipboard
fun Closeable(block: () -> Unit): AutoCloseable
Link copied to clipboard
fun Cancellable.closeable(e: () -> Throwable = { CancellationException("") }): AutoCloseable
Link copied to clipboard

Shortcut for throwing a DeprecatedException with a provided msg

Link copied to clipboard
expect fun enterDebugger()

Triggers an enter debugger. In JS it is debugger; in other places serves as a placeholder to put a breakpoint.

actual fun enterDebugger()

Triggers an enter debugger. In JS it is debugger; in other places serves as a placeholder to put a breakpoint.

actual fun enterDebugger()

Triggers an enter debugger. In JS it is debugger; in other places serves as a placeholder to put a breakpoint.

actual fun enterDebugger()

Triggers an enter debugger. In JS it is debugger; in other places serves as a placeholder to put a breakpoint.

actual fun enterDebugger()

Triggers an enter debugger. In JS it is debugger; in other places serves as a placeholder to put a breakpoint.

Link copied to clipboard
fun Environment(envs: Map<String, String> = mapOf()): Environment

Creates a new Environment with the provided envs

Link copied to clipboard

Expands the str replacing ~ with the user home

Link copied to clipboard

Shortcut for throwing a InternalException with a provided code

Link copied to clipboard

Shortcut for throwing a InvalidArgumentException with a provided msg

Link copied to clipboard

Shortcut for throwing a InvalidArgumentException with a provided msg

Link copied to clipboard

Shortcut for throwing a InvalidOperationException with a provided msg

Link copied to clipboard

Shortcut for throwing a MalformedInputException with a provided msg

Link copied to clipboard

Shortcut for throwing a MustValidateCodeException with a provided msg

Link copied to clipboard
fun noImpl(msg: String): Nothing

Shortcut for throwing a NotImplementedException with a provided msg

Link copied to clipboard

Shortcut for throwing a ReservedException with a provided msg

Link copied to clipboard
inline fun <R> runIgnoringExceptions(show: Boolean = false, action: () -> R): R?

Similar to runCatching but will return null if an exception is thrown. There is an optional show parameter to also print a stacktrace in the case there is an exception, while still returning null.

Link copied to clipboard

Shortcut for throwing a UnexpectedException with a provided msg

Link copied to clipboard

Shortcut for throwing a UnreachableException with a provided msg

Link copied to clipboard
fun unsupported(msg: String = "unsupported"): Nothing

Shortcut for throwing a CancelException with a provided msg

Link copied to clipboard
inline fun <T : AutoCloseable?, TR> T.useIt(block: (T) -> TR): TR
Link copied to clipboard
inline fun <T : AutoCloseable?, TR> T.useThis(block: T.() -> TR): TR