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

This commit is contained in:
Zachary Anderson
2020-02-26 21:45:02 -08:00
committed by GitHub
parent 80619f100f
commit f1cd47ef5c
84 changed files with 308 additions and 204 deletions

View File

@@ -73,7 +73,8 @@ class VMPlatform extends PlatformPlugin {
Isolate isolate;
try {
isolate = await _spawnIsolate(codePath, receivePort.sendPort);
} catch (error) {
// This catch rethrows, so doesn't need to catch only Exception.
} catch (error) { // ignore: avoid_catches_without_on_clauses
receivePort.close();
rethrow;
}