# Overview

## `RangeError {}`

The `RangeError` object is an extension of the [`CommonError`](https://docs.angular-package.dev/error/commonerror) 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="accessors/get-max"><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="../generic-type-variables#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="accessors/get-min"><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="../generic-type-variables#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="accessors/get-name"><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="accessors/get-range"><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="accessors/get-min">minimum</a> and <a href="accessors/get-max">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="accessors/get-symbol.tostringtag"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://docs.angular-package.dev/error/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=""><code>RangeError</code></a>.</p> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

### Properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="properties/static-template"><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="../../commonerror/properties/static-template#problem"><code>{problem}</code></a>, <a href="../../commonerror/properties/static-template#fix"><code>{fix}</code></a> and optional <a href="../../commonerror/properties/static-template#id"><code>{id}</code></a>, <a href="../../commonerror/properties/static-template#max"><code>{max}</code></a>, <a href="../../commonerror/properties/static-template#min"><code>{min}</code></a> tags.</p> |
| <p><a href="properties/max"><strong>#max?</strong></a><strong>:</strong> <mark style="color:green;">Max</mark><br>Private property of the <a href="../../getting-started/basic-concepts#range">maximum range</a> of generic type variable <a href="../generic-type-variables#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="properties/min"><strong>#min?</strong></a><strong>:</strong> <mark style="color:green;">Min</mark><br>Private property of the <a href="../../getting-started/basic-concepts#range">minimum range</a> of generic type variable <a href="../generic-type-variables#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="methods/static-define"><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=""><code>RangeError</code></a> instance with the <a href="../commonerror/accessors/get-message">message</a> built from the given required <a href="../methods/static-define#problem-string"><code>problem</code></a>, <a href="../methods/static-define#fix-string"><code>fix</code></a> and optional <a href="../methods/static-define#id-id"><code>id</code></a>, <a href="../methods/static-define#max-max"><code>max</code></a>, <a href="../methods/static-define#min-min"><code>min</code></a> on the given or stored <a href="../methods/static-define#template-rangeerror.template"><code>template</code></a>.</p> |
| <p><strong>public static</strong> <a href="methods/static-israngeerror"><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="../methods/static-israngeerror#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=""><code>RangeError</code></a> of any or the given <a href="../methods/static-israngeerror#min-number">minimum</a>/<a href="../methods/static-israngeerror#max-number">maximum</a> range and <a href="../methods/static-israngeerror#id-id">identification</a>.</p>                                                                                                                  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.angular-package.dev/error/rangeerror/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
