Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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