★ Constructor
The `RangeError` object constructor
RangeError()
RangeError()
Creates the RangeError
instance that represents range error with the message built of the given described problem
and its solution, optional min
/max
range, and an explicit identification on the given or stored error message template.
Parameters
problem:
string
problem:
string
Description of the problem of a string
type.
fix:
string
fix:
string
A solution to the given problem
of a string
type.
id?:
Id
id?:
Id
Optional unique identification to the given problem
of generic type variable Id
.
The optional minimum range of generic type variable Min
that causes an error to be thrown(or not thrown).
The optional maximum range of generic type variable Max
that causes an error to be thrown(or not thrown).
Optional template of the error message of string
type with the replaceable {problem}
, {fix}
and optional {id}
, {max}
, {min}
tags. By default, the value is equal to the static property RangeError.template
.
Example usage
Last updated