[**@tevm/errors**](../README.md) *** [@tevm/errors](../globals.md) / InvalidSelfdestructError # Class: InvalidSelfdestructError Represents an error that occurs when the selfdestruct parameter is invalid. This error is typically encountered when setting an account's selfdestruct status with an invalid value. ## Example ```javascript import { InvalidSelfdestructError } from '@tevm/errors' import { createMemoryClient } from '@tevm/memory-client' const client = createMemoryClient() try { await client.setAccount({ address: '0x1234567890123456789012345678901234567890', selfdestruct: 'not_a_boolean', // Should be a boolean }) } catch (error) { if (error instanceof InvalidSelfdestructError) { console.error('Invalid selfdestruct value:', error.message) console.log('Documentation:', error.docsLink) } } ``` ## Extends - [`InvalidParamsError`](InvalidParamsError.md) ## Constructors ### Constructor > **new InvalidSelfdestructError**(`message`, `args?`): `InvalidSelfdestructError` Constructs an InvalidSelfdestructError. #### Parameters | Parameter | Type | Description | | ------ | ------ | ------ | | `message` | `string` | Human-readable error message. | | `args?` | [`InvalidSelfdestructErrorParameters`](../interfaces/InvalidSelfdestructErrorParameters.md) | Additional parameters for the InvalidSelfdestructError. | #### Returns `InvalidSelfdestructError` #### Overrides [`InvalidParamsError`](InvalidParamsError.md).[`constructor`](InvalidParamsError.md#constructor) ## Properties | Property | Modifier | Type | Default value | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | ------ | | `_tag` | `public` | `string` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`_tag`](InvalidParamsError.md#_tag) | | `cause` | `public` | `any` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`cause`](InvalidParamsError.md#cause) | | `code` | `public` | `number` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`code`](InvalidParamsError.md#code) | | `details` | `public` | `string` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`details`](InvalidParamsError.md#details) | | `docsPath` | `public` | `string` \| `undefined` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`docsPath`](InvalidParamsError.md#docspath) | | `metaMessages` | `public` | `string`[] \| `undefined` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`metaMessages`](InvalidParamsError.md#metamessages) | | `name` | `public` | `string` | `undefined` | - | `InvalidParamsError.name` | | `shortMessage` | `public` | `string` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`shortMessage`](InvalidParamsError.md#shortmessage) | | `version` | `public` | `string` | `undefined` | - | [`InvalidParamsError`](InvalidParamsError.md).[`version`](InvalidParamsError.md#version) | | `code` | `static` | `number` | `-32602` | The error code for InvalidParamsError. | [`InvalidParamsError`](InvalidParamsError.md).[`code`](InvalidParamsError.md#code-1) | ## Methods ### walk() > **walk**(`fn?`): `unknown` Walks through the error chain. #### Parameters | Parameter | Type | Description | | ------ | ------ | ------ | | `fn?` | `Function` | A function to execute on each error in the chain. | #### Returns `unknown` The first error that matches the function, or the original error. #### Inherited from [`InvalidParamsError`](InvalidParamsError.md).[`walk`](InvalidParamsError.md#walk)