Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Unified Diff: runtime/vm/service/message.dart

Issue 1297313005: Fix the error response for bad isolate ids, etc. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/service/client.dart ('k') | runtime/vm/service/running_isolates.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'));
}
}
« no previous file with comments | « runtime/vm/service/client.dart ('k') | runtime/vm/service/running_isolates.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698