title: Handling exception properly in ionic2 app
body: <p>My ionic2 app use firebase authentication. I try to handle auth/account-exists-with-different-credential error when use same email login to multiple provider(google and facebook) like this.</p>
  
  <pre><code>constructor(public af: AngularFire,public navCtrl: NavController) {
      firebase.auth().getRedirectResult()
        .then(res=&gt;{
          console.log('success',res)
        })
    .catch((err:any)=&gt;{
      console.log(error.message)
      if (err.code=='auth/account-exists-with-different-credential'){
         doaccountlink();
      }
    })
    }
  
  
  
      fblogin(){
          firebase.auth().signInWithRedirect(new firebase.auth.FacebookAuthProvider())
        }
  
        gglogin(){
          firebase.auth().signInWithRedirect(new firebase.auth.GoogleAuthProvider())
        }
  </code></pre>
  
  <p>i can catch that error code in catch block(as expect) but the problem is Exception still show in console and my page also show error(see attach image). i'm new to javascript/typescript, In java if i already catch error in catch block then it should be fine. or something wrong in my code. How can i prevent this exception to show on my page?</p>
  
  <p><a href="https://i.stack.imgur.com/r79o8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r79o8.png" alt="enter image description here"></a></p>