I currently have this code:
if (!task.isSuccessful() && task.getException() != null) {
FirebaseCrash.report(task.getException());
Log.w(TAG, "signInWithCredential", task.getException());
Toast.makeText(SignUp.this, "Authentication failed: " + task.getException().getMessage(),Toast.LENGTH_LONG).show();
}
Sometimes a user gets a FirebaseAuthUserCollisionException
, and I want to detect it in a switch
statement like so:
switch(task.getException()){
case /*I don't know what goes here*/:
//Whatever
}
But as you read, I don't know what to put in the case
statement. What do I put in there? In other words, where is the FirebaseAuthUserCollisionException
located so I can access it? FirebaseAuthUserCollisionException
is just a class so I can't currently do anything with it.