[flutter_tool] Where possible, catch only subtypes of Exception (#51440)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user