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

Side by Side Diff: pkg/analysis_server/lib/src/plugin/plugin_manager.dart

Issue 2913913002: Report plugin errors to the instrumentation service (Closed)
Patch Set: Created 3 years, 6 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/lib/instrumentation/instrumentation.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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:io' show Platform; 7 import 'dart:io' show Platform;
8 8
9 import 'package:analysis_server/src/plugin/notification_manager.dart'; 9 import 'package:analysis_server/src/plugin/notification_manager.dart';
10 import 'package:analyzer/context/context_root.dart' as analyzer; 10 import 'package:analyzer/context/context_root.dart' as analyzer;
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 channel.close(); 741 channel.close();
742 channel = null; 742 channel = null;
743 pluginStoppedCompleter.complete(null); 743 pluginStoppedCompleter.complete(null);
744 } 744 }
745 745
746 /** 746 /**
747 * Handle the fact that an unhandled error has occurred in the plugin. 747 * Handle the fact that an unhandled error has occurred in the plugin.
748 */ 748 */
749 void handleOnError(List<String> errorPair) { 749 void handleOnError(List<String> errorPair) {
750 // TODO(brianwilkerson) Decide how we want to handle errors. 750 // TODO(brianwilkerson) Decide how we want to handle errors.
751 // String message = errorPair[0]; 751 info.instrumentationService.logPluginException(
752 // String stackTrace = errorPair[1]; 752 info.data, errorPair[0], new StackTrace.fromString(errorPair[1]));
753 // print('PluginSession.handleOnError');
754 // print(' plugin = ${info.executionPath}');
755 // print(' $message');
756 // print(' ${new StackTrace.fromString(stackTrace)}');
757 // pluginStoppedCompleter.completeError(message, new StackTrace.fromString(st ackTrace));
758 } 753 }
759 754
760 /** 755 /**
761 * Handle a [response] from the plugin by completing the future that was 756 * Handle a [response] from the plugin by completing the future that was
762 * created when the request was sent. 757 * created when the request was sent.
763 */ 758 */
764 void handleResponse(Response response) { 759 void handleResponse(Response response) {
765 _PendingRequest requestData = pendingRequests.remove(response.id); 760 _PendingRequest requestData = pendingRequests.remove(response.id);
766 int responseTime = new DateTime.now().millisecondsSinceEpoch; 761 int responseTime = new DateTime.now().millisecondsSinceEpoch;
767 int duration = responseTime - requestData.requestTime; 762 int duration = responseTime - requestData.requestTime;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 * The completer that will be used to complete the future when the response is 879 * The completer that will be used to complete the future when the response is
885 * received from the plugin. 880 * received from the plugin.
886 */ 881 */
887 final Completer<Response> completer; 882 final Completer<Response> completer;
888 883
889 /** 884 /**
890 * Initialize a pending request. 885 * Initialize a pending request.
891 */ 886 */
892 _PendingRequest(this.method, this.requestTime, this.completer); 887 _PendingRequest(this.method, this.requestTime, this.completer);
893 } 888 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/instrumentation/instrumentation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698