> For the complete documentation index, see [llms.txt](https://error.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://error.angular-package.dev/rangeerror/overview.md).

# Overview

## `RangeError {}`

The `RangeError` object is an extension of the [`CommonError`](/commonerror/overview.md) class and is thrown when a value is not in the set or range of allowed values with the message built from the described problem and its solution, optional explicit identification and minimum/maximum range on the given or stored template.

{% embed url="<https://github.com/angular-package/error/blob/main/src/lib/range-error.class.ts>" %}
`range-error.class.ts`
{% endembed %}

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="/pages/NxbK0CCmXotwf62SPRSv"><strong>max()</strong></a><strong>:</strong> <mark style="color:green;">Max</mark>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | <mark style="color:green;">undefined</mark><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains the maximum range of generic type variable <a href="/pages/4o4mE7ENn7hKzuk12xAY#rangeerror-less-than-id-min-max-greater-than-2"><code>Max</code></a> that causes an error to be thrown(or not thrown), if set, otherwise returns <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined"><code>undefined</code></a>.</p> |
| <p><strong>public get</strong> <a href="/pages/hAUnk7kQWfBzQorubNcw"><strong>min()</strong></a><strong>:</strong> <mark style="color:green;">Min</mark>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | <mark style="color:green;">undefined</mark><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains the minimum range of generic type variable <a href="/pages/4o4mE7ENn7hKzuk12xAY#rangeerror-less-than-id-min-max-greater-than-1"><code>Min</code></a> that causes an error to be thrown(or not thrown), if set, otherwise returns <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined"><code>undefined</code></a>.</p> |
| <p><strong>public get</strong> <a href="/pages/w2qz76L9DB4zOc0HfiTs"><strong>name()</strong></a><strong>:</strong> <mark style="color:green;">string</mark> <br>Error name of a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>string</code></a> type, set to <code>'RangeError'</code> that is being thrown.</p>                                                                                                                                                                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| <p><strong>public get</strong> <a href="/pages/hNpHiHHjvVmOjCfqZqYf"><strong>range()</strong></a><strong>:</strong> { min?: <mark style="color:green;">Min</mark>; max?: <mark style="color:green;">Max</mark> } <br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains the <a href="/pages/hAUnk7kQWfBzQorubNcw">minimum</a> and <a href="/pages/NxbK0CCmXotwf62SPRSv">maximum</a> range in the form of an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>.</p>                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| <p><strong>public get</strong> <a href="/pages/UILbX43HX7GQA8UqJOmo"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://error.angular-package.dev/rangeerror)</strong></a><strong>:</strong> <mark style="color:green;">string</mark><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor, with the help of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag"><code>toStringTag</code></a>, changes the default tag to <code>'RangeError'</code> for an instance of <a href="/pages/XTL5Khe1PhScTJnRkiDh"><code>RangeError</code></a>.</p> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

### Properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/yqgr3HjFTyrXiV7yh0Xx"><strong>template</strong></a><strong>:</strong> <mark style="color:green;">string</mark><br>A template of the error message of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>string</code></a> type with the replaceable <a href="/pages/akE6vknq8khSYhbok2vb#problem"><code>{problem}</code></a>, <a href="/pages/akE6vknq8khSYhbok2vb#fix"><code>{fix}</code></a> and optional <a href="/pages/akE6vknq8khSYhbok2vb#id"><code>{id}</code></a>, <a href="/pages/akE6vknq8khSYhbok2vb#max"><code>{max}</code></a>, <a href="/pages/akE6vknq8khSYhbok2vb#min"><code>{min}</code></a> tags.</p> |
| <p><a href="/pages/BuTFE6zoCgaGuhnnIVFt"><strong>#max?</strong></a><strong>:</strong> <mark style="color:green;">Max</mark><br>Private property of the <a href="/pages/6Nle1uMltWSb2uh6hgTQ#range">maximum range</a> of generic type variable <a href="/pages/4o4mE7ENn7hKzuk12xAY#rangeerror-less-than-id-min-max-greater-than-2"><code>Max</code></a> that causes an error to be thrown(or not thrown).</p>                                                                                                                                                                                                                                                                                                                   |
| <p><a href="/pages/I2ne0dK2qnw4AnG6ML2h"><strong>#min?</strong></a><strong>:</strong> <mark style="color:green;">Min</mark><br>Private property of the <a href="/pages/6Nle1uMltWSb2uh6hgTQ#range">minimum range</a> of generic type variable <a href="/pages/4o4mE7ENn7hKzuk12xAY#minextendsnumber-or-undefined-undefined"><code>Min</code></a> that causes an error to be thrown(or not thrown).</p>                                                                                                                                                                                                                                                                                                                          |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public static</strong> <a href="/pages/pIRw6dz385L7OxhSnFpa"><strong>define()</strong></a><strong>:</strong> <mark style="color:green;">RangeError</mark><<mark style="color:green;">Id</mark>, <mark style="color:green;">Min</mark>, <mark style="color:green;">Max</mark>><br>Defines the <a href="/pages/XTL5Khe1PhScTJnRkiDh"><code>RangeError</code></a> instance with the <a href="/pages/UAsNmVmOuYGxNypELFFh">message</a> built from the given required <a href="/pages/pIRw6dz385L7OxhSnFpa#problem-string"><code>problem</code></a>, <a href="/pages/pIRw6dz385L7OxhSnFpa#fix-string"><code>fix</code></a> and optional <a href="/pages/pIRw6dz385L7OxhSnFpa#id-id"><code>id</code></a>, <a href="/pages/pIRw6dz385L7OxhSnFpa#max-max"><code>max</code></a>, <a href="/pages/pIRw6dz385L7OxhSnFpa#min-min"><code>min</code></a> on the given or stored <a href="/pages/pIRw6dz385L7OxhSnFpa#template-rangeerror.template"><code>template</code></a>.</p> |
| <p><strong>public static</strong> <a href="/pages/lUISc8abHJfLgsx2BRMZ"><strong>isRangeError()</strong></a><strong>:</strong> value is <mark style="color:green;">RangeError</mark><<mark style="color:green;">Id</mark>, <mark style="color:green;">Min</mark>, <mark style="color:green;">Max</mark>><br>Checks whether the <a href="/pages/lUISc8abHJfLgsx2BRMZ#value-any"><code>value</code></a> of <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any"><code>any</code></a> type is an instance of <a href="/pages/XTL5Khe1PhScTJnRkiDh"><code>RangeError</code></a> of any or the given <a href="/pages/lUISc8abHJfLgsx2BRMZ#min-number">minimum</a>/<a href="/pages/lUISc8abHJfLgsx2BRMZ#max-number">maximum</a> range and <a href="/pages/lUISc8abHJfLgsx2BRMZ#id-id">identification</a>.</p>                                                                                                                                             |
