Index: runtime/vm/service/message.dart |
diff --git a/runtime/vm/service/message.dart b/runtime/vm/service/message.dart |
index c5c37866bd3d082eddfdf774cc01287b2ea857ef..043c941f1889966b6affa5ec711baff7bd80327e 100644 |
--- a/runtime/vm/service/message.dart |
+++ b/runtime/vm/service/message.dart |
@@ -139,20 +139,9 @@ class Message { |
_completer.complete(response); |
} |
- void setErrorResponse(String message) { |
- var response = { |
- 'jsonrpc': '2.0', |
- 'id': serial, |
- 'result' : { |
- 'type': 'Error', |
- 'message': message, |
- 'request': { |
- 'method': method, |
- 'params': params |
- } |
- } |
- }; |
- _completer.complete(JSON.encode(response)); |
+ void setErrorResponse(int code, String details) { |
+ _completer.complete(encodeRpcError(this, code, |
+ details: '$method: $details')); |
} |
} |