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

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: 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
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 12bd79873538217b4bd99974912d12f632c5ed6f..5fa8c608419d3623740d48568d6113a30e884103 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -25,6 +25,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);
@@ -38,6 +54,8 @@ class JSONStream : ValueObject {
const Array& param_values);
void SetupError();
+ void PrintError(intptr_t code, const char* details_format, ...);
+
void PostReply();
TextBuffer* buffer() { return &buffer_; }

Powered by Google App Engine
This is Rietveld 408576698