Options
All
  • Public
  • Public/Protected
  • All
Menu

A class that extends Error and adds a type property and a handled flag.

Starts with "I" to avoid conflict with built-in Error type.

Type parameters

  • TType

Hierarchy

  • Error
    • IError

Index

Constructors

constructor

  • new IError<TType>(options: { data?: {}; diagnosticInfo?: string; handled?: boolean; message: string; type: TType }): IError<TType>
  • Type parameters

    • TType

    Parameters

    • options: { data?: {}; diagnosticInfo?: string; handled?: boolean; message: string; type: TType }
      • Optional data?: {}
        • [key: string]: unknown
      • Optional diagnosticInfo?: string
      • Optional handled?: boolean
      • message: string
      • type: TType

    Returns IError<TType>

Properties

data

data: {}

Type declaration

  • [key: string]: unknown

Optional Readonly diagnosticInfo

diagnosticInfo?: string

handled

handled: boolean

Readonly message

message: string

name

name: string

Optional stack

stack?: string

Readonly type

type: TType

Static Optional prepareStackTrace

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

Type declaration

Static stackTraceLimit

stackTraceLimit: number

Methods

Static captureStackTrace

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc