StateVarError Reference

Table of Contents


Introduction

The StateVarError object is used as a state variable error value. It extends the JavaScript Error class. When a StateVarError instance is used in a computation, it resolves to the value of this.cause.errorValue if it exists or NAN otherwise. When used as a String, it resolves to this.message.

Predefined error values

There are several predefined instances of StateVarError. See Predefined StateVarError instances

Constructor

Syntax

new StateVarError()
new StateVarError(message)
new StateVarError(message, options)
new StateVarError(message, fileName)
new StateVarError(message, fileName, lineNumber)

The StateVarError constructor takes the same parameters as the JavaScript Error constructor.


Instance methods

valueOf()

Syntax

valueOf()

Returns the value of this.cause.errorValue if it exists or NaN otherwise.


toString()

Syntax

toString()

Returns the value of this.message.


Predefined StateVarError instances

INVALID_NONE


INVALID_VALUE


INVALID_POH