Represents an error for Akairo.

Type Parameters

  • K extends keyof typeof Messages

Hierarchy

  • Error
    • AkairoError

Constructors

  • Type Parameters

    • K extends
          | "INVALID_CLASS_TO_HANDLE"
          | "FILE_NOT_FOUND"
          | "MODULE_NOT_FOUND"
          | "ALREADY_LOADED"
          | "NOT_RELOADABLE"
          | "ALIAS_CONFLICT"
          | "UNEXPECTED_SLASH_COMMAND_TYPE"
          | "COMMAND_UTIL_EXPLICIT"
          | "UNKNOWN_MATCH_TYPE"
          | "NOT_INSTANTIABLE"
          | "NOT_IMPLEMENTED"
          | "INVALID_TYPE"

    Parameters

    • key: K

      Error key.

    • ...args: MessageArgs[K]

      Arguments.

    Returns AkairoError<K>

Properties

cause?: unknown
code: string

The error code.

message: string
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Accessors

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void