| OLD | NEW |
| 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 library analysis.server; | 5 library analysis.server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 return; | 428 return; |
| 429 } | 429 } |
| 430 if (response != null) { | 430 if (response != null) { |
| 431 channel.sendResponse(response); | 431 channel.sendResponse(response); |
| 432 return; | 432 return; |
| 433 } | 433 } |
| 434 } on RequestFailure catch (exception) { | 434 } on RequestFailure catch (exception) { |
| 435 channel.sendResponse(exception.response); | 435 channel.sendResponse(exception.response); |
| 436 return; | 436 return; |
| 437 } catch (exception, stackTrace) { | 437 } catch (exception, stackTrace) { |
| 438 RequestError error = | 438 RequestError error = new RequestError( |
| 439 new RequestError(RequestErrorCode.SERVER_ERROR, exception); | 439 RequestErrorCode.SERVER_ERROR, |
| 440 exception.toString()); |
| 440 if (stackTrace != null) { | 441 if (stackTrace != null) { |
| 441 error.stackTrace = stackTrace.toString(); | 442 error.stackTrace = stackTrace.toString(); |
| 442 } | 443 } |
| 443 Response response = new Response(request.id, error: error); | 444 Response response = new Response(request.id, error: error); |
| 444 channel.sendResponse(response); | 445 channel.sendResponse(response); |
| 445 return; | 446 return; |
| 446 } | 447 } |
| 447 } | 448 } |
| 448 channel.sendResponse(new Response.unknownRequest(request)); | 449 channel.sendResponse(new Response.unknownRequest(request)); |
| 449 }, onError: _sendServerErrorNotification); | 450 }, onError: _sendServerErrorNotification); |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 // send the notification | 946 // send the notification |
| 946 channel.sendNotification( | 947 channel.sendNotification( |
| 947 new ServerErrorParams( | 948 new ServerErrorParams( |
| 948 true, | 949 true, |
| 949 exceptionString, | 950 exceptionString, |
| 950 stackTraceString).toNotification()); | 951 stackTraceString).toNotification()); |
| 951 } | 952 } |
| 952 } | 953 } |
| 953 | 954 |
| 954 typedef void OptionUpdater(AnalysisOptionsImpl options); | 955 typedef void OptionUpdater(AnalysisOptionsImpl options); |
| OLD | NEW |