rangeError

fun rangeError(message: String, cause: Throwable? = null, raise: Boolean = false): RangeError

RangeError convenience function: wrap the provided message and optional cause; then, optionally raise.

Return

Wrapped RangeError, 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.