Hierarchy

  • Error
    • ViewerError

Constructors

Properties

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

Type declaration

stackTraceLimit: number

Methods

  • Splits the given error message into a known viewer error id and the message itself.

    E.g.: Message [InvalidParameterValue] Some error msg returns { id: 'InvalidParameterValue', msg: 'Some error msg' }

    Returns

    id = The extracted error id (one of GlobalViewerErrorIds) or undefined if no valid ID has been found msg = The error message without the prefixed ID. Returns the whole given message if it isn't prefixed with a known ID in the correct format.

    Parameters

    • message: string

      An error message in the form [KnownErrorId] Some error msg

    Returns { id: undefined | string; msg: string }

    • id: undefined | string
    • msg: string
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc