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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index eae0df6ec62d5f51f0a5bc3b1330c03736c02854..46f196107523c3b14bf9e7a290d37eeafa5b12e1 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -781,7 +781,13 @@ class AnalysisServer {
.toNotification());
// send to crash reporting
- options.crashReportSender?.sendReport(exception, stackTrace: stackTrace);
+ if (options.crashReportSender != null) {
+ // Catch and ignore any exceptions when reporting exceptions (network
+ // errors or other).
+ options.crashReportSender
+ .sendReport(exception, stackTrace: stackTrace)
+ .catchError((_) {});
+ }
// remember the last few exceptions
if (exception is CaughtException) {
« 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