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

Side by Side Diff: runtime/vm/json_stream.cc

Issue 1164463005: Rename some service protocol errors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/debugger.h" 8 #include "vm/debugger.h"
9 #include "vm/json_stream.h" 9 #include "vm/json_stream.h"
10 #include "vm/message.h" 10 #include "vm/message.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 case kParseError: 88 case kParseError:
89 return "Parse error"; 89 return "Parse error";
90 case kInvalidRequest: 90 case kInvalidRequest:
91 return "Invalid Request"; 91 return "Invalid Request";
92 case kMethodNotFound: 92 case kMethodNotFound:
93 return "Method not found"; 93 return "Method not found";
94 case kInvalidParams: 94 case kInvalidParams:
95 return "Invalid params"; 95 return "Invalid params";
96 case kInternalError: 96 case kInternalError:
97 return "Internal error"; 97 return "Internal error";
98 case kFeatureDisabled:
99 return "Feature is disabled";
98 case kVMMustBePaused: 100 case kVMMustBePaused:
99 return "VM must be paused"; 101 return "VM must be paused";
100 case kNoBreakAtLine: 102 case kCannotAddBreakpoint:
101 return "Cannot set breakpoint at line"; 103 return "Cannot add breakpoint";
102 case kNoBreakAtFunction:
103 return "Cannot set breakpoint at function";
104 case kProfilingDisabled:
105 return "Profiling is disabled";
106 default: 104 default:
107 UNIMPLEMENTED(); 105 UNIMPLEMENTED();
108 return "Unexpected rpc error code"; 106 return "Unexpected rpc error code";
109 } 107 }
110 } 108 }
111 109
112 110
113 static void PrintRequest(JSONObject* obj, JSONStream* js) { 111 static void PrintRequest(JSONObject* obj, JSONStream* js) {
114 JSONObject jsobj(obj, "request"); 112 JSONObject jsobj(obj, "request");
115 jsobj.AddProperty("method", js->method()); 113 jsobj.AddProperty("method", js->method());
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); 607 intptr_t len2 = OS::VSNPrint(p, len+1, format, args);
610 va_end(args); 608 va_end(args);
611 ASSERT(len == len2); 609 ASSERT(len == len2);
612 stream_->buffer_.AddChar('"'); 610 stream_->buffer_.AddChar('"');
613 stream_->AddEscapedUTF8String(p); 611 stream_->AddEscapedUTF8String(p);
614 stream_->buffer_.AddChar('"'); 612 stream_->buffer_.AddChar('"');
615 free(p); 613 free(p);
616 } 614 }
617 615
618 } // namespace dart 616 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698