private FirebaseAuthException GetFirebaseAuthException(NSErrorException ex) { AuthErrorCode errorCode; if (IntPtr.Size == 8) // 64 bits devices { errorCode = (AuthErrorCode)((long)ex.Error.Code); } else // 32 bits devices { errorCode = (AuthErrorCode)((int)ex.Error.Code); } FirebaseExceptionTypeToEnumDict.TryGetValue(errorCode, out FirebaseAuthExceptionType exceptionType); throw new FirebaseAuthException(ex.Message, ex, exceptionType); }
private FirebaseAuthException GetFirebaseAuthException(Exception ex) { FirebaseExceptionTypeToEnumDict.TryGetValue(ex.GetType(), out FirebaseAuthExceptionType exceptionType); throw new FirebaseAuthException(ex.Message, ex, exceptionType); }