throw toolExit instead of rethrowing on filesystem exceptions (#31404)

This commit is contained in:
Jonah Williams
2019-04-22 09:56:14 -07:00
committed by GitHub
parent b9170a9d9a
commit 18e294dbd7

View File

@@ -6,6 +6,7 @@ import 'dart:async';
import 'package:meta/meta.dart';
import 'base/common.dart';
import 'base/context.dart';
import 'base/file_system.dart';
import 'base/io.dart' show SocketException;
@@ -272,8 +273,7 @@ class Cache {
try {
await _downloadFile(url, cachedFile);
} catch (e) {
printError('Failed to fetch third-party artifact $url: $e');
rethrow;
throwToolExit('Failed to fetch third-party artifact $url: $e');
}
}