| 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 json_rpc_2.server; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 import 'dart:collection'; | 6 import 'dart:collection'; |
| 9 import 'dart:convert'; | 7 import 'dart:convert'; |
| 10 | 8 |
| 11 import 'package:stack_trace/stack_trace.dart'; | 9 import 'package:stack_trace/stack_trace.dart'; |
| 12 | 10 |
| 13 import '../error_code.dart' as error_code; | 11 import '../error_code.dart' as error_code; |
| 14 import 'exception.dart'; | 12 import 'exception.dart'; |
| 15 import 'parameters.dart'; | 13 import 'parameters.dart'; |
| 16 import 'two_way_stream.dart'; | 14 import 'two_way_stream.dart'; |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 return syncFuture(() => iterator.current(params)).catchError((error) { | 245 return syncFuture(() => iterator.current(params)).catchError((error) { |
| 248 if (error is! RpcException) throw error; | 246 if (error is! RpcException) throw error; |
| 249 if (error.code != error_code.METHOD_NOT_FOUND) throw error; | 247 if (error.code != error_code.METHOD_NOT_FOUND) throw error; |
| 250 return _tryNext(); | 248 return _tryNext(); |
| 251 }); | 249 }); |
| 252 } | 250 } |
| 253 | 251 |
| 254 return _tryNext(); | 252 return _tryNext(); |
| 255 } | 253 } |
| 256 } | 254 } |
| OLD | NEW |