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

Unified Diff: runtime/vm/json_stream.h

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 years, 7 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/observatory/tests/service/test_helper.dart ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 8784b3979c95f262213203d270dc930e4f3c2744..3c3bc9c1d3b83244f19c7a3f17a577179f7cb4b3 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -26,6 +26,22 @@ class SourceBreakpoint;
class String;
class Zone;
+
+enum JSONRpcErrorCode {
+ kParseError = -32700,
+ kInvalidRequest = -32600,
+ kMethodNotFound = -32601,
+ kInvalidParams = -32602,
+ kInternalError = -32603,
+
+ kVMMustBePaused = 100,
+ kNoBreakAtLine = 101,
+ kNoBreakAtFunction = 102,
+
+ kProfilingDisabled = 200,
+};
+
+
class JSONStream : ValueObject {
public:
explicit JSONStream(intptr_t buf_size = 256);
@@ -39,6 +55,8 @@ class JSONStream : ValueObject {
const Array& param_values);
void SetupError();
+ void PrintError(intptr_t code, const char* details_format, ...);
+
void PostReply();
void set_id_zone(ServiceIdZone* id_zone) {
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698