Revert "[flutter_tool] Where possible, catch only subtypes of Exception (#51440)" (#51539)

This reverts commit f1cd47ef5c.
This commit is contained in:
Zachary Anderson
2020-02-26 23:42:19 -08:00
committed by GitHub
parent f1cd47ef5c
commit 483f49962c
84 changed files with 204 additions and 308 deletions

View File

@@ -406,15 +406,11 @@ class XCDevice {
final String architecture = deviceProperties['architecture'] as String;
try {
cpuArchitecture = getIOSArchForName(architecture);
} on Exception {
// Fallback to default iOS architecture. Future-proof against a
// theoretical version of Xcode that changes this string to something
// slightly different like "ARM64".
} catch (error) {
// Fallback to default iOS architecture. Future-proof against a theoretical version
// of Xcode that changes this string to something slightly different like "ARM64".
cpuArchitecture ??= defaultIOSArchs.first;
_logger.printError(
'Unknown architecture $architecture, defaulting to '
'${getNameForDarwinArch(cpuArchitecture)}',
);
_logger.printError('Unknown architecture $architecture, defaulting to ${getNameForDarwinArch(cpuArchitecture)}');
}
}
return cpuArchitecture;