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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_manager.dart

Issue 187603010: gracefully degrade with response to client if fail to access client specified dart sdk (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: take 2 Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/domain_server.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:convert'; 6 import 'dart:convert';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analysis_server/src/channel.dart'; 9 import 'package:analysis_server/src/channel.dart';
10 import 'package:analysis_server/src/domain_server.dart'; 10 import 'package:analysis_server/src/domain_server.dart';
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Future<bool> stop() { 119 Future<bool> stop() {
120 if (process == null) { 120 if (process == null) {
121 return channel.close().then((_) => false); 121 return channel.close().then((_) => false);
122 } 122 }
123 return channel 123 return channel
124 .sendRequest(new Request('0', ServerDomainHandler.SHUTDOWN_METHOD)) 124 .sendRequest(new Request('0', ServerDomainHandler.SHUTDOWN_METHOD))
125 .timeout(new Duration(seconds: 2), onTimeout: () { 125 .timeout(new Duration(seconds: 2), onTimeout: () {
126 print('Expected shutdown response'); 126 print('Expected shutdown response');
127 }) 127 })
128 .then((Response response) { 128 .then((Response response) {
129 channel.close(); 129 return channel.close().then((_) => process.exitCode);
130 return process.exitCode;
131 }) 130 })
132 .timeout(new Duration(seconds: 2), onTimeout: () { 131 .timeout(new Duration(seconds: 2), onTimeout: () {
133 print('Expected server to shutdown'); 132 print('Expected server to shutdown');
134 process.kill(); 133 process.kill();
135 }) 134 })
136 .then((int result) { 135 .then((int result) {
137 if (result != null && result != 0) { 136 if (result != null && result != 0) {
138 exitCode = result; 137 exitCode = result;
139 } 138 }
140 return true; 139 return true;
141 }); 140 });
142 } 141 }
143 } 142 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/domain_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698