# GlobalErrorHandler | CICADA
Documentation for CICADA

Provides a hook for centralized exception handling.

### Hierarchy

- ErrorHandler
  - GlobalErrorHandler

## Index

### Constructors

- constructor

### Properties

- sentencesForWarningLogging

### Methods

- handleError
- isWarning
- logError

## Constructors

### constructor

- new GlobalErrorHandler(loggingService: LoggingService, router: Router): GlobalErrorHandler

- Overrides ErrorHandler.constructor

  - Defined in src/app/_helpers/global-error-handler.ts:41

  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[] = []

- Defined in src/app/_helpers/global-error-handler.ts:41

An array of sentence sections that denote warnings.

## Methods

### handleError

- handleError(error: Error): void

- Overrides ErrorHandler.handleError

  - Defined in src/app/_helpers/global-error-handler.ts:58

  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

- - Defined in src/app/_helpers/global-error-handler.ts:84

  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

- - Defined in src/app/_helpers/global-error-handler.ts:104

  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