# Overview

## `CommonError {}`

The `CommonError` abstract object to throw an [identified](https://docs.angular-package.dev/error/getting-started/basic-concepts#identification) error with a [solution](https://docs.angular-package.dev/error/getting-started/basic-concepts#fix) to the described [problem](https://docs.angular-package.dev/error/getting-started/basic-concepts#problem), additional [type](https://docs.angular-package.dev/error/getting-started/basic-concepts#type), and [range](https://docs.angular-package.dev/error/getting-started/basic-concepts#range) built on the [template](https://docs.angular-package.dev/error/getting-started/basic-concepts#template).

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

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                              |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="accessors/get-fix"><strong>fix()</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 obtains a possible <a href="../../getting-started/basic-concepts#fix">solution</a> to the described <a href="accessors/get-problem">problem</a> by returning the <a href="properties/fix"><code>#fix</code></a> property of a specified object</p>                                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                              |
| <p><strong>public get</strong> <a href="accessors/get-id"><strong>id()</strong></a><strong>:</strong> <mark style="color:green;">Id</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 gets the error <a href="../../getting-started/basic-concepts#identification">identification</a> by returning the <a href="properties/id"><code>#id</code></a> property of a specified object.</p> |
| <p><strong>public get</strong> <a href="accessors/get-link"><strong>link()</strong></a><strong>:</strong> <mark style="color:green;">string</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 gets the link(to read more about the thrown error) by returning the <a href="properties/link"><code>#link</code></a> property of a specified object.</p>                                          |
| <p><strong>public get</strong> <a href="accessors/get-message"><strong>message()</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 gets the error <a href="../../getting-started/basic-concepts#message">message</a> by returning the parent <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/message"><code>message</code></a> property of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error"><code>Error</code></a> object.</p> |                                                                                                                                                                                                                                                                                                                                                                              |
| <p><strong>public get</strong> <a href="accessors/get-problem"><strong>problem()</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 gets the <a href="../../getting-started/basic-concepts#problem">problem</a> by returning the <a href="properties/problem"><code>#problem</code></a> property of a specified object.</p>                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                              |
| <p><strong>public get</strong> <a href="accessors/get-template"><strong>template()</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 gets the <a href="../../getting-started/basic-concepts#template">template</a> of the error message by returning the <a href="properties/template"><code>#template</code></a> property of a specified object.</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="../constructor#problem"><code>{problem}</code></a>, <a href="../constructor#fix"><code>{fix}</code></a> and optional <a href="../constructor#id"><code>{id}</code></a>, <code>{link}</code>, <a href="../constructor#max"><code>{max}</code></a>, <a href="../constructor#min"><code>{min}</code></a>, <a href="../constructor#type"><code>{type}</code></a> tags.</p>                                                                             |
| <p><a href="properties/fix"><strong>#fix</strong></a><strong>:</strong> <mark style="color:green;">string</mark><br>A privately stored possible solution to the described <a href="../../getting-started/basic-concepts#problem">problem</a> of a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>string</code></a> type.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| <p><a href="properties/id"><strong>#id?</strong></a><strong>:</strong> <mark style="color:green;">Id</mark><br>A privately stored unique <a href="../../getting-started/basic-concepts#identification">identification</a> of the described <a href="../../getting-started/basic-concepts#problem">problem</a> of generic type variable <a href="../generic-type-variables#wrap-opening"><code>Id</code></a>.</p>                                                                                                                                                                                                                                                                                                                                                                                                      |
| <p><a href="properties/link"><strong>#link?</strong></a><strong>:</strong> <mark style="color:green;">string</mark><br>The optional privately stored link of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>string</code></a> type redirects to read more about the thrown error.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| <p><a href="properties/problem"><strong>#problem</strong></a><strong>:</strong> <mark style="color:green;">string</mark><br>A privately stored <a href="../../getting-started/basic-concepts#problem">problem</a> of a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>string</code></a> type.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| <p><a href="properties/template"><strong>#template</strong></a><strong>:</strong> <mark style="color:green;">string</mark><br>A <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string-type</a> privately stored <a href="../../getting-started/basic-concepts#template">template</a> of the error <a href="../../getting-started/basic-concepts#message">message</a> that contains replaceable required <a href="../constructor#fix"><code>{fix}</code></a>, <a href="../constructor#problem"><code>{problem}</code></a> and optional <a href="../constructor#id"><code>{id}</code></a>, <a href="../constructor#max"><code>{max}</code></a>, <a href="../constructor#min"><code>{min}</code></a>, <a href="../constructor#type"><code>{type}</code></a> tags.</p> |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>protected static</strong> <a href="methods/static-definemessage"><strong>defineMessage()</strong></a><strong>:</strong> <mark style="color:green;">string</mark><br>The static "<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals">tag</a>" method builds from the given <a href="../methods/static-definemessage#...values-any"><code>values</code></a> the error message of a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>string</code></a> type on the template.</p> |
| <p><strong>protected static</strong> <a href="methods/static-iserror"><strong>isError()</strong></a><strong>: value is</strong> <mark style="color:green;">CommonError</mark><<mark style="color:green;">Id</mark>><br>Checks whether the <a href="../methods/static-iserror#value-any"><code>value</code></a> of any type is a <code>this</code> instance of any or the given <a href="../methods/static-iserror#id-id">identification</a>.</p>                                                                                                                                          |
