of

fun of(msg: String, errno: Int? = null, vararg extraProps: Pair<String, Any>): Error

Manufacture a generic JavaScript error with the provided msg and optional cause.

Return

Constructed JS exception type.

Parameters

msg

Message to enclose for the error.

errno

Optional error number to include.

extraProps

Extra properties to mount on the error.


fun of(msg: String, cause: Throwable?, errno: Int? = null, vararg extraProps: Pair<String, Any>): Error

Manufacture a generic JavaScript error with the provided msg and optional cause.

Return

Constructed JS exception type.

Parameters

msg

Message to enclose for the error.

cause

Caught error to wrap, if any.

errno

Optional error number to include.

extraProps

Extra properties to mount on the error.