Skip to content

Commit

Permalink
Stop using FallThroughError. (#105600)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrhn authored Jun 9, 2022
1 parent 86ab44c commit c951d2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/flutter_tools/lib/src/commands/custom_devices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
pingSuccessRegex: null
);
} else {
throw FallThroughError();
throw UnsupportedError('Unsupported operating system');
}

final bool apply = await askApplyConfig(
Expand Down Expand Up @@ -809,7 +809,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
if (boolArgDeprecated(_kSsh) == true) {
return runInteractivelySsh();
}
throw FallThroughError();
throw UnsupportedError('Unknown run mode');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class CustomDeviceConfig {
platform = archString == null
? null
: getTargetPlatformForName(archString);
} on FallThroughError {
} on UnsupportedError {
throw const CustomDeviceRevivalException.fromDescriptions(
_kPlatform,
'null or one of linux-arm64, linux-x64'
Expand Down Expand Up @@ -300,7 +300,7 @@ class CustomDeviceConfig {
if (platform.isLinux || platform.isMacOS) {
return exampleUnix;
}
throw FallThroughError();
throw UnsupportedError('Unsupported operating system');
}

final String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ CustomDevicesCommand createCustomDevicesCommand({
hostPlatform: platform.isLinux ? HostPlatform.linux_x64
: platform.isWindows ? HostPlatform.windows_x64
: platform.isMacOS ? HostPlatform.darwin_x64
: throw FallThroughError()
: throw UnsupportedError('Unsupported operating system')
),
terminal: terminal != null
? terminal(platform)
Expand Down

0 comments on commit c951d2d

Please sign in to comment.