Skip to content

Commit 0592d02

Browse files
authored
chore: Replace FallThroughError with UnsupportedError (#10087)
1 parent b574ae3 commit 0592d02

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/platform_interface/utils/load_bundle_task_state.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ LoadBundleTaskState convertToTaskState(String state) {
1414
case 'error':
1515
return LoadBundleTaskState.error;
1616
default:
17-
throw FallThroughError();
17+
throw UnsupportedError('Unknown LoadBundleTaskState value: $state.');
1818
}
1919
}

packages/cloud_firestore/cloud_firestore_web/lib/src/utils/web_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ DocumentChangeType convertWebDocumentChangeType(String changeType) {
6868
case _kChangeTypeRemoved:
6969
return DocumentChangeType.removed;
7070
default:
71-
throw FallThroughError();
71+
throw UnsupportedError('Unknown DocumentChangeType: $changeType.');
7272
}
7373
}
7474

packages/firebase_auth/firebase_auth_platform_interface/lib/src/action_code_info.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ActionCodeInfo {
6262
case 6:
6363
return ActionCodeInfoOperation.revertSecondFactorAddition;
6464
default:
65-
throw FallThroughError();
65+
throw UnsupportedError('Unknown ActionCodeInfoOperation: $_operation.');
6666
}
6767
}
6868

packages/firebase_auth/firebase_auth_platform_interface/test/action_code_info_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ void main() {
111111
});
112112

113113
test(
114-
'throws a [FallThroughError] when operation does not match a known type',
114+
'throws a [UnsupportedError] when operation does not match a known type',
115115
() {
116116
ActionCodeInfo testActionCodeInfo =
117117
ActionCodeInfo(operation: -1, data: kMockData);
118118

119119
expect(() => testActionCodeInfo.operation,
120-
throwsA(isA<FallThroughError>()));
120+
throwsA(isA<UnsupportedError>()));
121121
});
122122
});
123123
});

packages/firebase_auth/firebase_auth_web/lib/src/utils/web_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ auth_interop.AuthProvider convertPlatformAuthProvider(
265265
return auth_interop.SAMLAuthProvider(authProvider.providerId);
266266
}
267267

268-
throw FallThroughError();
268+
throw UnsupportedError('Unknown AuthProvider: $authProvider.');
269269
}
270270

271271
/// Converts a [auth_interop.AuthCredential] into a [AuthCredential].

0 commit comments

Comments
 (0)