Chromium Code Reviews| Index: pkg/analyzer_plugin/test/integration/support/integration_tests.dart |
| diff --git a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart |
| index 46200d4236bea66e5a1bd97cf38437da831e0681..b259903ac7e92bdffeacf9e12c68c23c0e5cbdec 100644 |
| --- a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart |
| +++ b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart |
| @@ -261,6 +261,17 @@ abstract class AbstractAnalysisServerIntegrationTest |
| } |
| /** |
| + * An error result from a server call. |
|
Brian Wilkerson
2017/02/12 18:47:09
I was going to suggest changing "server" to "plugi
devoncarew
2017/02/12 19:22:47
Updated the dartdoc (call -> request).
I'm happy
|
| + */ |
| +class ServerErrorMessage { |
| + final Map message; |
| + |
| + ServerErrorMessage(this.message); |
| + |
| + dynamic get error => message['error']; |
| +} |
| + |
| +/** |
| * Wrapper class for Matcher which doesn't create the underlying Matcher object |
| * until it is needed. This is necessary in order to create matchers that can |
| * refer to themselves (so that recursive data structures can be represented). |
| @@ -558,9 +569,7 @@ class Server { |
| _pendingCommands.remove(id); |
| } |
| if (messageAsMap.containsKey('error')) { |
| - // TODO(paulberry): propagate the error info to the completer. |
| - completer.completeError(new UnimplementedError( |
| - 'Server responded with an error: ${JSON.encode(message)}')); |
| + completer.completeError(new ServerErrorMessage(messageAsMap)); |
| } else { |
| completer.complete(messageAsMap['result']); |
| } |