Class ErrorUtilsUndefinedBehaviour<T>

This is a special error that is only used for absurd situations Intended to placate typescript so that unreachable code type checks If this is thrown, this means there is a bug in the code

Type Parameters

  • T

Hierarchy

Constructors

  • Type Parameters

    • T

    Parameters

    • Optional message: string
    • Optional options: {
          cause?: T;
          data?: POJO;
          timestamp?: Date;
      }
      • Optional cause?: T
      • Optional data?: POJO
      • Optional timestamp?: Date

    Returns ErrorUtilsUndefinedBehaviour<T>

Properties

cause: T

Causation of the exception Can be used to know what caused this exception

data: POJO

Arbitrary data

exitCode: 70 = sysexits.SOFTWARE
message: string
name: string
stack?: string
timestamp: Date

Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

description: string = 'You should never see this error'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Accessors

  • get description(): string
  • Returns string

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

  • Type Parameters

    • T extends Class<any>

    Parameters

    • this: T
    • json: any

    Returns InstanceType<T>

Generated using TypeDoc