error

fun error(reason: JsError? = definedExternally)(source)

MDN Reference