Options
All
  • Public
  • Public/Protected
  • All
Menu

A base class for exceptions

Extending javascript Error class has a quirk, check the constructor of this class to see the workaround. Exception class takes care of that thus making it easier to create custom error classes by just extending the Exception class.

Hierarchy

  • Error
    • Exception

Index

Constructors

constructor

Properties

message

message: string

name

name: string

Optional stack

stack: string

Static Optional prepareStackTrace

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

Optional override for formatting stack traces

see

https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

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

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited method
  • Property
  • Private property
  • Static method

Generated using TypeDoc