Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides a hook for centralized exception handling.

Hierarchy

  • ErrorHandler
    • GlobalErrorHandler

Index

Constructors

constructor

  • Initialization of the Global Error Handler.

    Parameters

    • loggingService: LoggingService

      A service that provides logging capabilities.

    • router: Router

      A service that provides navigation among views and URL manipulation capabilities.

    Returns GlobalErrorHandler

Properties

Private sentencesForWarningLogging

sentencesForWarningLogging: string[] = []

An array of sentence sections that denote warnings.

Methods

handleError

  • handleError(error: Error): void
  • Handles different types of errors.

    Parameters

    • error: Error

      An error objects thrown when a runtime errors occurs.

    Returns void

Private isWarning

  • isWarning(errorTraceString: string): boolean
  • Checks if an error is of type warning.

    Parameters

    • errorTraceString: string

      A description of the error and it's stack trace.

    Returns boolean

    true - If the error is of type warning.

logError

  • logError(error: any): void
  • Write appropriate logs according to the type of error.

    Parameters

    • error: any

      An error objects thrown when a runtime errors occurs.

    Returns void

Generated using TypeDoc