File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
packages/telemetry/src/angular Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,30 @@ registerTelemetry();
2828
2929export * from '../public-types' ;
3030
31+ /**
32+ * A custom ErrorHandler that captures uncaught errors and sends them to Firebase Telemetry.
33+ *
34+ * This should be provided in your application's root module.
35+ *
36+ * @example
37+ * ```typescript
38+ * import { ErrorHandler } from '@angular/core';
39+ * import { FirebaseErrorHandler } from '@firebase/telemetry-angular';
40+ *
41+ * @NgModule ({
42+ * // ...
43+ * providers: [
44+ * { provide: ErrorHandler, useClass: FirebaseErrorHandler }
45+ * ],
46+ * // ...
47+ * })
48+ * export class AppModule { }
49+ * ```
50+ *
51+ * @param telemetryOptions - {@link TelemetryOptions} that configure the Telemetry instance.
52+ *
53+ * @public
54+ */
3155export class FirebaseErrorHandler implements ErrorHandler {
3256 private readonly router = inject ( Router ) ;
3357
You can’t perform that action at this time.
0 commit comments