• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NationalBankBelgium / stark / 9411545197

07 Jun 2024 04:15AM CUT coverage: 88.859%. Remained the same
9411545197

Pull #3814

github

web-flow
Merge c56164050 into fd511f3f4
Pull Request #3814: chore(deps): bump zone.js from 0.13.3 to 0.14.7 in /starter

1258 of 1525 branches covered (82.49%)

Branch coverage included in aggregate %.

3775 of 4139 relevant lines covered (91.21%)

193.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/packages/stark-core/src/modules/error-handling/error-handling.module.ts
1
import { ErrorHandler, ModuleWithProviders, NgModule, Optional, SkipSelf } from "@angular/core";
2
import { StarkErrorHandler } from "./handlers/error-handler";
3

4
@NgModule({})
5
export class StarkErrorHandlingModule {
1✔
6
        /**
7
         * Instantiates the services only once since they should be singletons
8
         * so the `forRoot()` should be called only by the `AppModule`.
9
         *
10
         * See {@link https://v12.angular.io/guide/singleton-services#the-forroot-pattern|Angular docs: The forRoot() pattern}
11
         * @returns A module with providers
12
         */
13
        public static forRoot(): ModuleWithProviders<StarkErrorHandlingModule> {
14
                return {
×
15
                        ngModule: StarkErrorHandlingModule,
16
                        providers: [
17
                                {
18
                                        provide: ErrorHandler,
19
                                        useClass: StarkErrorHandler
20
                                }
21
                        ]
22
                };
23
        }
24

25
        /**
26
         * Prevents this module from being re-imported
27
         * See {@link https://v12.angular.io/guide/singleton-services#prevent-reimport-of-the-greetingmodule|Angular docs: Prevent reimport of a root module}
28
         * @param parentModule - The parent module
29
         */
30
        public constructor(
31
                @Optional()
32
                @SkipSelf()
33
                parentModule?: StarkErrorHandlingModule
34
        ) {
35
                if (parentModule) {
×
36
                        throw new Error("StarkErrorHandlingModule is already loaded. Import it in the AppModule only");
×
37
                }
38
        }
39
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc