Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c951d2d7
Unverified
Commit
c951d2d7
authored
Jun 09, 2022
by
Lasse R.H. Nielsen
Committed by
GitHub
Jun 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop using `FallThroughError`. (#105600)
parent
86ab44cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
custom_devices.dart
packages/flutter_tools/lib/src/commands/custom_devices.dart
+2
-2
custom_device_config.dart
...er_tools/lib/src/custom_devices/custom_device_config.dart
+2
-2
custom_devices_test.dart
...ols/test/commands.shard/hermetic/custom_devices_test.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/commands/custom_devices.dart
View file @
c951d2d7
...
@@ -780,7 +780,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
...
@@ -780,7 +780,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
pingSuccessRegex:
null
pingSuccessRegex:
null
);
);
}
else
{
}
else
{
throw
FallThroughError
(
);
throw
UnsupportedError
(
'Unsupported operating system'
);
}
}
final
bool
apply
=
await
askApplyConfig
(
final
bool
apply
=
await
askApplyConfig
(
...
@@ -809,7 +809,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
...
@@ -809,7 +809,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
if
(
boolArgDeprecated
(
_kSsh
)
==
true
)
{
if
(
boolArgDeprecated
(
_kSsh
)
==
true
)
{
return
runInteractivelySsh
();
return
runInteractivelySsh
();
}
}
throw
FallThroughError
(
);
throw
UnsupportedError
(
'Unknown run mode'
);
}
}
}
}
...
...
packages/flutter_tools/lib/src/custom_devices/custom_device_config.dart
View file @
c951d2d7
...
@@ -138,7 +138,7 @@ class CustomDeviceConfig {
...
@@ -138,7 +138,7 @@ class CustomDeviceConfig {
platform
=
archString
==
null
platform
=
archString
==
null
?
null
?
null
:
getTargetPlatformForName
(
archString
);
:
getTargetPlatformForName
(
archString
);
}
on
FallThrough
Error
{
}
on
Unsupported
Error
{
throw
const
CustomDeviceRevivalException
.
fromDescriptions
(
throw
const
CustomDeviceRevivalException
.
fromDescriptions
(
_kPlatform
,
_kPlatform
,
'null or one of linux-arm64, linux-x64'
'null or one of linux-arm64, linux-x64'
...
@@ -300,7 +300,7 @@ class CustomDeviceConfig {
...
@@ -300,7 +300,7 @@ class CustomDeviceConfig {
if
(
platform
.
isLinux
||
platform
.
isMacOS
)
{
if
(
platform
.
isLinux
||
platform
.
isMacOS
)
{
return
exampleUnix
;
return
exampleUnix
;
}
}
throw
FallThroughError
(
);
throw
UnsupportedError
(
'Unsupported operating system'
);
}
}
final
String
id
;
final
String
id
;
...
...
packages/flutter_tools/test/commands.shard/hermetic/custom_devices_test.dart
View file @
c951d2d7
...
@@ -323,7 +323,7 @@ CustomDevicesCommand createCustomDevicesCommand({
...
@@ -323,7 +323,7 @@ CustomDevicesCommand createCustomDevicesCommand({
hostPlatform:
platform
.
isLinux
?
HostPlatform
.
linux_x64
hostPlatform:
platform
.
isLinux
?
HostPlatform
.
linux_x64
:
platform
.
isWindows
?
HostPlatform
.
windows_x64
:
platform
.
isWindows
?
HostPlatform
.
windows_x64
:
platform
.
isMacOS
?
HostPlatform
.
darwin_x64
:
platform
.
isMacOS
?
HostPlatform
.
darwin_x64
:
throw
FallThroughError
(
)
:
throw
UnsupportedError
(
'Unsupported operating system'
)
),
),
terminal:
terminal
!=
null
terminal:
terminal
!=
null
?
terminal
(
platform
)
?
terminal
(
platform
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment