Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "errors/helpers"

Index

Type aliases

ExceptionHandler

ExceptionHandler: (exception: Exception) => void

A global handler to process ignored exceptions.

Type declaration

Functions

dontIgnoreExceptions

  • dontIgnoreExceptions(): void

ignoreExceptions

  • ignoreExceptions(...exceptions: { constructor: any }[] | { constructor: any }[][]): void
  • Turns off the given exceptions. Once turned off, the specified exception will not be thrown. When such error occurred, if a global error handler is previously set with setExceptionHandler, the error handler will be invoked with the actual exception.

    Parameters

    • Rest ...exceptions: { constructor: any }[] | { constructor: any }[][]

      everything passed to this parameter, albeit arrays, rest arguments, or combination of both, will be flattened to a one-dimension array.

    Returns void

setExceptionHandler

shouldIgnoreException

  • shouldIgnoreException(ex: Exception): boolean

throwException

  • throwException<T>(exception: T): void

Generated using TypeDoc