Skip to content

Commit c951d2d

Browse files
authored
Stop using FallThroughError. (#105600)
1 parent 86ab44c commit c951d2d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/flutter_tools/lib/src/commands/custom_devices.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
780780
pingSuccessRegex: null
781781
);
782782
} else {
783-
throw FallThroughError();
783+
throw UnsupportedError('Unsupported operating system');
784784
}
785785

786786
final bool apply = await askApplyConfig(
@@ -809,7 +809,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
809809
if (boolArgDeprecated(_kSsh) == true) {
810810
return runInteractivelySsh();
811811
}
812-
throw FallThroughError();
812+
throw UnsupportedError('Unknown run mode');
813813
}
814814
}
815815

packages/flutter_tools/lib/src/custom_devices/custom_device_config.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class CustomDeviceConfig {
138138
platform = archString == null
139139
? null
140140
: getTargetPlatformForName(archString);
141-
} on FallThroughError {
141+
} on UnsupportedError {
142142
throw const CustomDeviceRevivalException.fromDescriptions(
143143
_kPlatform,
144144
'null or one of linux-arm64, linux-x64'
@@ -300,7 +300,7 @@ class CustomDeviceConfig {
300300
if (platform.isLinux || platform.isMacOS) {
301301
return exampleUnix;
302302
}
303-
throw FallThroughError();
303+
throw UnsupportedError('Unsupported operating system');
304304
}
305305

306306
final String id;

packages/flutter_tools/test/commands.shard/hermetic/custom_devices_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ CustomDevicesCommand createCustomDevicesCommand({
323323
hostPlatform: platform.isLinux ? HostPlatform.linux_x64
324324
: platform.isWindows ? HostPlatform.windows_x64
325325
: platform.isMacOS ? HostPlatform.darwin_x64
326-
: throw FallThroughError()
326+
: throw UnsupportedError('Unsupported operating system')
327327
),
328328
terminal: terminal != null
329329
? terminal(platform)

0 commit comments

Comments
 (0)