SHARE
TWEET

Untitled

a guest Jun 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { OperatorFunction, EMPTY } from 'rxjs';
  2. import { catchError } from 'rxjs/operators';
  3. import { ErrorDisplayService } from './error-display.service';
  4.  
  5. export function swallowError<T>(): OperatorFunction<T, T>  {
  6.   return catchError(() => (EMPTY));
  7. }
  8.  
  9. export function swallowErrorWithDisplay<T>(eds: ErrorDisplayService): OperatorFunction<T, T>  {
  10.   return catchError(err => {
  11.     eds.reportError(err);
  12.     return EMPTY;
  13.   });
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top