Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Side by Side Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 2965263002: Make exception reporting best effort. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io' as io; 6 import 'dart:io' as io;
7 7
8 import 'package:analyzer/error/error.dart'; 8 import 'package:analyzer/error/error.dart';
9 import 'package:analyzer/file_system/file_system.dart' as file_system; 9 import 'package:analyzer/file_system/file_system.dart' as file_system;
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // Wait a brief time for any analytics calls to finish. 218 // Wait a brief time for any analytics calls to finish.
219 await analytics.waitForLastPing(timeout: new Duration(milliseconds: 200)); 219 await analytics.waitForLastPing(timeout: new Duration(milliseconds: 200));
220 analytics.close(); 220 analytics.close();
221 } 221 }
222 222
223 Future<ErrorSeverity> _analyzeAll(CommandLineOptions options) async { 223 Future<ErrorSeverity> _analyzeAll(CommandLineOptions options) async {
224 PerformanceTag previous = _analyzeAllTag.makeCurrent(); 224 PerformanceTag previous = _analyzeAllTag.makeCurrent();
225 try { 225 try {
226 return await _analyzeAllImpl(options); 226 return await _analyzeAllImpl(options);
227 } catch (e, st) { 227 } catch (e, st) {
228 crashReportSender.sendReport(e, stackTrace: st); 228 // Catch and ignore any exceptions when reporting exceptions (network
229 // errors or other).
230 crashReportSender.sendReport(e, stackTrace: st).catchError((_) {});
229 rethrow; 231 rethrow;
230 } finally { 232 } finally {
231 previous.makeCurrent(); 233 previous.makeCurrent();
232 } 234 }
233 } 235 }
234 236
235 /// Perform analysis according to the given [options]. 237 /// Perform analysis according to the given [options].
236 Future<ErrorSeverity> _analyzeAllImpl(CommandLineOptions options) async { 238 Future<ErrorSeverity> _analyzeAllImpl(CommandLineOptions options) async {
237 if (!options.machineFormat) { 239 if (!options.machineFormat) {
238 List<String> fileNames = options.sourceFiles.map((String file) { 240 List<String> fileNames = options.sourceFiles.map((String file) {
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 for (var package in packages) { 1007 for (var package in packages) {
1006 var packageName = path.basename(package.path); 1008 var packageName = path.basename(package.path);
1007 var realPath = package.resolveSymbolicLinksSync(); 1009 var realPath = package.resolveSymbolicLinksSync();
1008 result[packageName] = [ 1010 result[packageName] = [
1009 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 1011 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
1010 ]; 1012 ];
1011 } 1013 }
1012 return result; 1014 return result;
1013 } 1015 }
1014 } 1016 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698