[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/errors](https://jsprismarine.dev/api/@jsprismarine/errors/index.md) / common

# common

## Variables

### CommonErrors

> `const` **CommonErrors**: `Readonly`\<\{ `ThrownValue`: *typeof* `ThrownValue`; \}\>

Defined in: [packages/errors/src/common.ts:40](https://github.com/JSPrismarine/JSPrismarine/blob/9db8dc5e83d04708d63ff9d73cae14f6c6b880f6/packages/errors/src/common.ts#L40)

Errors any package may raise, not tied to one domain.

## Functions

### asError()

> **asError**(`value`): `Error`

Defined in: [packages/errors/src/common.ts:46](https://github.com/JSPrismarine/JSPrismarine/blob/9db8dc5e83d04708d63ff9d73cae14f6c6b880f6/packages/errors/src/common.ts#L46)

A thrown value as an `Error`: itself when it is one, otherwise wrapped so its text survives into
a log or a rejection that expects an `Error`.

#### Parameters

##### value

`unknown`

#### Returns

`Error`
