# Public API

Public features that can be imported.

```typescript
import {
  // Class.
  CommonError,
  CommonErrors,
  Error,
  Errors,
  RangeError,
  RangeErrors,
  TypeError,
  TypeErrors,
  ValidationError,
  ValidationErrors
} from '@angular-package/error';
```

### `CommonError`

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

### `CommonErrors`

The [`CommonErrors`](https://error.angular-package.dev/draft-5/commonerrors) object represents the storage of errors with [unique identification](https://error.angular-package.dev/draft-5/basic-concepts#unique-identification) numbers.

### `Error`

The [`Error`](https://error.angular-package.dev/draft-5/error) object is an extension of the [`CommonError`](https://error.angular-package.dev/draft-5/commonerror) class and is thrown when a runtime error occurs with a [message](https://app.gitbook.com/s/23iV8ygEQUrhqw7I3D8g/~/changes/lXvTfsmAkHoNRKsQjxlq/commonerror/accessors/get-message) built from a [solution](https://app.gitbook.com/s/23iV8ygEQUrhqw7I3D8g/~/changes/lXvTfsmAkHoNRKsQjxlq/commonerror/accessors/get-fix) to the described [problem](https://app.gitbook.com/s/23iV8ygEQUrhqw7I3D8g/~/changes/lXvTfsmAkHoNRKsQjxlq/commonerror/accessors/get-problem) but with additional identification, on the [template](https://app.gitbook.com/s/23iV8ygEQUrhqw7I3D8g/~/changes/lXvTfsmAkHoNRKsQjxlq/commonerror/accessors/get-template).

### `Errors`

The [`Errors`](https://error.angular-package.dev/draft-5/errors) is an extension of the [`CommonErrors`](https://error.angular-package.dev/draft-5/commonerrors) object that represents multiple identification numbers under which the errors of the [`Error`](https://error.angular-package.dev/draft-5/error) type are prepared to throw.

### `RangeError`

The [`RangeError`](https://error.angular-package.dev/draft-5/rangeerror) object is an extension of the [`CommonError`](https://error.angular-package.dev/draft-5/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.

### `RangeErrors`

The [`RangeErrors`](https://error.angular-package.dev/draft-5/rangeerrors) is an extension of the [`CommonErrors`](https://error.angular-package.dev/draft-5/commonerrors) object that represents multiple identification numbers under which the errors of the [`RangeError`](https://error.angular-package.dev/draft-5/rangeerror) type are prepared to throw.

### `TypeError`

The [`TypeError`](https://error.angular-package.dev/draft-5/typeerror) object is an extension of the [`CommonError`](https://error.angular-package.dev/draft-5/commonerror) class and is thrown when an operation could not be performed, typically(but not exclusively) when a value is not of the expected type, with the [message](https://error.angular-package.dev/draft-5/commonerror/accessors/get-message) built from the described problem and its solution, optional an explicit identification and type, on the given or stored template.

### `TypeErrors`

The [`TypeErrors`](https://error.angular-package.dev/draft-5/typeerrors) is an extension of the [`CommonErrors`](https://error.angular-package.dev/draft-5/commonerrors) object that represents multiple identification numbers under which the errors of the [`TypeError`](https://error.angular-package.dev/draft-5/typeerror) type are prepared to throw.

### `ValidationError`

The [`ValidationError`](https://error.angular-package.dev/draft-5/validationerror) object is an extension of the [`CommonError`](https://error.angular-package.dev/draft-5/commonerror) class and is thrown when an operation could not be performed despite proper type(but not exclusively) with the [message](https://error.angular-package.dev/draft-5/commonerror/accessors/get-message) built from the described problem and its solution, along with additional identification on the given or stored template.

### `ValidationErrors`

The [`ValidationErrors`](https://error.angular-package.dev/draft-5/validationerrors) is an extension of the [`CommonErrors`](https://error.angular-package.dev/draft-5/commonerrors) object that represents multiple identification numbers under which the errors of the [`ValidationError`](https://error.angular-package.dev/draft-5/validationerror) type are prepared to throw.
