UNPKG

@rxap/ngx-error

Version:

This package provides a comprehensive error handling solution for Angular applications, including interceptors, services, and UI components to display different types of errors in a user-friendly dialog. It supports handling of generic errors, HTTP errors

100 lines (50 loc) 2.29 kB
[**@rxap/ngx-error v19.1.0**](../README.md) *** [@rxap/ngx-error](../globals.md) / RxapErrorHandler # Class: RxapErrorHandler Defined in: [error-handler.ts:46](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/error/src/lib/error-handler.ts#L46) ## Implements - `ErrorHandler` ## Constructors ### new RxapErrorHandler() > **new RxapErrorHandler**(): [`RxapErrorHandler`](RxapErrorHandler.md) #### Returns [`RxapErrorHandler`](RxapErrorHandler.md) ## Properties ### injector > `protected` `readonly` **injector**: `Injector` Defined in: [error-handler.ts:63](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/error/src/lib/error-handler.ts#L63) *** ### options > `protected` `readonly` **options**: [`ErrorHandlerOptions`](../interfaces/ErrorHandlerOptions.md) Defined in: [error-handler.ts:48](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/error/src/lib/error-handler.ts#L48) ## Methods ### handleError() > **handleError**(`errorCandidate`): `void` Defined in: [error-handler.ts:68](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/error/src/lib/error-handler.ts#L68) Method called for every value captured through the ErrorHandler #### Parameters ##### errorCandidate `unknown` #### Returns `void` #### Implementation of `ErrorHandler.handleError` *** ### showAngularErrorDialog() > `protected` **showAngularErrorDialog**(`data`): `void` Defined in: [error-handler.ts:156](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/error/src/lib/error-handler.ts#L156) #### Parameters ##### data [`AngularErrorDialogData`](../interfaces/AngularErrorDialogData.md) #### Returns `void` *** ### showOpenApiHttpResponseErrorDialog() > `protected` **showOpenApiHttpResponseErrorDialog**(`data`): `void` Defined in: [error-handler.ts:150](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/error/src/lib/error-handler.ts#L150) #### Parameters ##### data [`OpenApiHttpResponseErrorDialogData`](../interfaces/OpenApiHttpResponseErrorDialogData.md) #### Returns `void`