# CustomError

`class` in `seedcord` · v0.12.0

<https://docs.seedcord.org/packages/seedcord/0.12.0/classes/custom-error>

Base class for custom error types with Discord embed responses

Errors extending CustomError should be used with the `Catchable` decorators to implement a control flow. These errors will be caught and handled by the framework to show the user the configured response.

```ts
abstract class CustomError extends Error
```

## Constructors

### constructor

```ts
protected CustomError(message: string)
```

Constructs a new instance of the `CustomError` class

## Properties

### emit

```ts
public get emit(): boolean
```

```ts
public set emit(value: boolean)
```

Whether this error should be emitted to logs

Controls logging behavior. Errors with emit=true will always be logged, while emit=false errors may be suppressed in production.

### message

```ts
public message: string
```

### response

```ts
public readonly response: EmbedBuilder
```
