| Index: runtime/observatory/lib/src/service/object.dart
|
| diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
|
| index 609c7bd61edc537985a0bb04c42c5ff2b7f8f211..b56048bb0509b0888ce26d7b231e5328f923b7ad 100644
|
| --- a/runtime/observatory/lib/src/service/object.dart
|
| +++ b/runtime/observatory/lib/src/service/object.dart
|
| @@ -495,8 +495,13 @@ abstract class VM extends ServiceObjectOwner {
|
| try {
|
| var decoder = new JsonDecoder(_reviver);
|
| map = decoder.convert(response);
|
| - } catch (e, st) {
|
| - return null;
|
| + } catch (e) {
|
| + return toObservable({
|
| + 'type': 'ServiceException',
|
| + 'kind': 'JSONDecodeException',
|
| + 'response': map,
|
| + 'message': 'Could not decode JSON: $e',
|
| + });
|
| }
|
| return toObservable(map);
|
| }
|
| @@ -507,8 +512,7 @@ abstract class VM extends ServiceObjectOwner {
|
| return new Future.error(
|
| new ServiceObject._fromMap(this, toObservable({
|
| 'type': 'ServiceException',
|
| - 'id': '',
|
| - 'kind': 'FormatException',
|
| + 'kind': 'ResponseFormatException',
|
| 'response': map,
|
| 'message': 'Top level service responses must be service maps: ${map}.',
|
| })));
|
| @@ -523,21 +527,6 @@ abstract class VM extends ServiceObjectOwner {
|
| return new Future.value(map);
|
| }
|
|
|
| - Future<ObservableMap> _decodeError(e) {
|
| - return new Future.error(new ServiceObject._fromMap(this, toObservable({
|
| - 'type': 'ServiceException',
|
| - 'id': '',
|
| - 'kind': 'DecodeException',
|
| - 'response':
|
| - 'This is likely a result of a known V8 bug. Although the '
|
| - 'the bug has been fixed the fix may not be in your Chrome'
|
| - ' version. For more information see dartbug.com/18385. '
|
| - 'Observatory is still functioning and you should try your'
|
| - ' action again.',
|
| - 'message': 'Could not decode JSON: $e',
|
| - })));
|
| - }
|
| -
|
| /// Gets [id] as an [ObservableMap] from the service directly. If
|
| /// an error occurs, the future is completed as an error with a
|
| /// ServiceError or ServiceException. Therefore any chained then() calls
|
|
|