# Type Alias ErrorHandler

ErrorHandler: (exception: Error, cause?: string) => void

A callback type for handling errors.

#### Type declaration

- - (exception: Error, cause?: string): void

  - #### Parameters

    - exception: Error

      The exception associated with the error.

    - `Optional` cause: string

      Optional information about the context in which the error was thrown.

    #### Returns void

- Defined in src/core/error-handler.ts:7