valueError

fun valueError(error: Throwable, raise: Boolean = false): ValueError

ValueError convenience function: wrap the provided error and optionally raise.

Return

Wrapped ValueError, ready to be raised.

Parameters

error

Throwable error to wrap as a ValueError.

raise

Whether to throw the error after wrapping. Defaults to false.


fun valueError(message: String, cause: Throwable? = null, raise: Boolean = false): ValueError

ValueError convenience function: wrap the provided error and optionally raise.

Return

Wrapped ValueError, ready to be raised.

Parameters

message

String message for this error.

cause

Throwable error to wrap and consider the cause of this error.

raise

Whether to throw the error after wrapping. Defaults to false.