0.1.0 • Published 6 years ago

@ninthdegree/ngrx-exceptions v0.1.0

Weekly downloads
1
License
GPL-3.0-or-later
Repository
-
Last release
6 years ago

Ninth Degree Platform - Ngrx Exceptions

Provide exception management with NGRX

Quickstart

  • Install the package
npm i @ninthdegree/ngrx-exceptions
  • Import module
import {NgrxExceptionsModule} from '@ninthdegree/ngrx-exceptions';

@NgModule({
  imports: [
    ...
    NgrxExceptionsModule
    ]
})
export class AppModule {}
  • Create your own exceptions key
export const myTechnicalException = 'MyTechnicalException';
export const myFunctionalException = 'MyFunctionalException';
  • Throw exception
import { myTechnicalException, myFunctionalException } from './custom-exceptions.constant';
import {throwFunctionalException, throwTechnicalException} from "@ne/ngrx-exceptions";

throwFunctionalException(myFunctionalException, 'A functional Exception');
throwTechnicalException(myTechnicalException, 'A functional Exception', new Error());

Documentation and examples

Full documentation

0.1.0

6 years ago

0.0.3

6 years ago

0.0.3-snapshot

6 years ago