Skip to content

Instantly share code, notes, and snippets.

@MichaelMarner
Last active February 26, 2018 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelMarner/5ea48c94df696b64568d5b2c979a7c78 to your computer and use it in GitHub Desktop.
Save MichaelMarner/5ea48c94df696b64568d5b2c979a7c78 to your computer and use it in GitHub Desktop.
import { ErrorHandler, Inject } from '@angular/core';
import { AlertController } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
Import { RollbarService } form 'angular-rollbar';
export class MyErrorHandler implements ErrorHandler {
constructor(
private alerts: AlertController,
public splashScreen: SplashScreen,
public rollbar: RollbarService
) {}
async handleError(error) {
this.rollbar.error(error);
this.presentAlert();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment