# BitsetParseError

Defined in: [packages/bitset/src/errors.ts:60](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/bitset/src/errors.ts#L60)

Thrown when decoding a `serializeBitset` artifact that is malformed or internally inconsistent.

## Extends

* [`ParseError`](/reference/knotkit/errors/classes/parseerror/)<[`BitsetParseErrorCode`](/reference/knotkit/bitset/type-aliases/bitsetparseerrorcode/)>

## Constructors

### Constructor

> **new BitsetParseError**(`code`, `message`): `BitsetParseError`

Defined in: [packages/errors/src/index.ts:57](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L57)

#### Parameters

##### code

`"INVALID_CODEC_RESULT"` | `"INVALID_MAGIC"` | `"UNSUPPORTED_ENVELOPE_VERSION"` | `"UNSUPPORTED_PAYLOAD_VERSION"` | `"INVALID_SECTION_GEOMETRY"` | `"NONZERO_PADDING"` | `"MISALIGNED_SECTION"` | `"TRUNCATED_PAYLOAD"` | `"DECODE_BUDGET_EXCEEDED"` | `"UNSTABLE_BUFFER"` | `"WRONG_FORMAT"` | `"INTEGRITY_MISMATCH"` | `"UNKNOWN_KIND"` | `"INVALID_PACKAGE_HEADER"` | `"INVALID_ID_SEQUENCE"` | `"CARDINALITY_MISMATCH"`

##### message

`string`

#### Returns

`BitsetParseError`

#### Inherited from

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`constructor`](/reference/knotkit/errors/classes/parseerror/#constructor)

## Properties

### moduleName

> `readonly` **moduleName**: `"knotkit/bitset"`

Defined in: [packages/bitset/src/errors.ts:61](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/bitset/src/errors.ts#L61)

#### Overrides

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`moduleName`](/reference/knotkit/errors/classes/parseerror/#modulename)

***

### \_tag

> `readonly` **\_tag**: `"ParseError"`

Defined in: [packages/errors/src/index.ts:55](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L55)

#### Inherited from

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`_tag`](/reference/knotkit/errors/classes/parseerror/#_tag)

***

### code

> `readonly` **code**: `"INVALID_CODEC_RESULT"` | `"INVALID_MAGIC"` | `"UNSUPPORTED_ENVELOPE_VERSION"` | `"UNSUPPORTED_PAYLOAD_VERSION"` | `"INVALID_SECTION_GEOMETRY"` | `"NONZERO_PADDING"` | `"MISALIGNED_SECTION"` | `"TRUNCATED_PAYLOAD"` | `"DECODE_BUDGET_EXCEEDED"` | `"UNSTABLE_BUFFER"` | `"WRONG_FORMAT"` | `"INTEGRITY_MISMATCH"` | `"UNKNOWN_KIND"` | `"INVALID_PACKAGE_HEADER"` | `"INVALID_ID_SEQUENCE"` | `"CARDINALITY_MISMATCH"`

Defined in: [packages/errors/src/index.ts:58](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L58)

#### Inherited from

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`code`](/reference/knotkit/errors/classes/parseerror/#code-1)
