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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.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 | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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:collection'; 6 import 'dart:collection';
7 import 'dart:core'; 7 import 'dart:core';
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 import 'dart:math' show max; 9 import 'dart:math' show max;
10 10
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 buffer.writeln(); 774 buffer.writeln();
775 buffer.write(stackTrace); 775 buffer.write(stackTrace);
776 } 776 }
777 777
778 // send the notification 778 // send the notification
779 channel.sendNotification( 779 channel.sendNotification(
780 new ServerErrorParams(fatal, message, buffer.toString()) 780 new ServerErrorParams(fatal, message, buffer.toString())
781 .toNotification()); 781 .toNotification());
782 782
783 // send to crash reporting 783 // send to crash reporting
784 options.crashReportSender?.sendReport(exception, stackTrace: stackTrace); 784 if (options.crashReportSender != null) {
785 // Catch and ignore any exceptions when reporting exceptions (network
786 // errors or other).
787 options.crashReportSender
788 .sendReport(exception, stackTrace: stackTrace)
789 .catchError((_) {});
790 }
785 791
786 // remember the last few exceptions 792 // remember the last few exceptions
787 if (exception is CaughtException) { 793 if (exception is CaughtException) {
788 stackTrace ??= exception.stackTrace; 794 stackTrace ??= exception.stackTrace;
789 } 795 }
790 exceptions.add(new ServerException(message, exception, stackTrace, fatal)); 796 exceptions.add(new ServerException(message, exception, stackTrace, fatal));
791 } 797 }
792 798
793 /** 799 /**
794 * Send status notification to the client. The state of analysis is given by 800 * Send status notification to the client. The state of analysis is given by
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 /** 1495 /**
1490 * The [PerformanceTag] for time spent in server request handlers. 1496 * The [PerformanceTag] for time spent in server request handlers.
1491 */ 1497 */
1492 static PerformanceTag serverRequests = server.createChild('requests'); 1498 static PerformanceTag serverRequests = server.createChild('requests');
1493 1499
1494 /** 1500 /**
1495 * The [PerformanceTag] for time spent in split store microtasks. 1501 * The [PerformanceTag] for time spent in split store microtasks.
1496 */ 1502 */
1497 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1503 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1498 } 1504 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698