Options
All
  • Public
  • Public/Protected
  • All
Menu

An error handler system

Hierarchy

  • ErrorHandler

Index

Constructors

constructor

  • Construct an error handler with a logger instance

    Parameters

    Returns ErrorHandler

Methods

handle

  • handle(error: Error): Promise<void>
  • The handler to handle an error that occurs

    Parameters

    • error: Error

      any error instance

    Returns Promise<void>

register

  • Register one or more handlers

    Parameters

    • handlers: Handler[] | Handler

      A handler instance or an array of instances

    Returns void

resetUnhandledErrorHandler

  • resetUnhandledErrorHandler(): Handler
  • Reset the unhandled error handler back to the built-in default

    Returns Handler

    the previous handler

setUnhandledErrorHandler

  • Set the handler that is used when an error is not handled

    Parameters

    • handler: Handler

      a handler instance

    Returns Handler

    The previously defined handler

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc