# EventCatchable

`function` in `seedcord` · v0.11.0

<https://docs.seedcord.org/packages/seedcord/0.11.0/functions/event-catchable>

Catches and handles errors in event handler methods.

Catches errors thrown in event handlers and sends error responses if the event contains a Discord message object.

```ts
EventCatchable(
    options?: EventCatchableOptions
): (
    _target: RepliableEventHandler,
    _prop: string,
    descriptor: TypedPropertyDescriptor<
        (...args: any[]) => Promise<void>
    >
) => void
```

Catches and handles errors in event handler methods.

Catches errors thrown in event handlers and sends error responses if the event contains a Discord message object.

Parameters.

- `options?` `EventCatchableOptions` — Configuration for error handling behavior

Returns `(_target: RepliableEventHandler, _prop: string, descriptor: TypedPropertyDescriptor<(...args: any[]) => Promise<void>>) => void`.
