Flutter Engine
The Flutter Engine
|
Public Member Functions | |
RPCError (JsonObject json) | |
int | getCode () |
String | getDetails () |
String | getMessage () |
JsonObject | getRequest () |
Public Member Functions inherited from org.dartlang.vm.service.element.Element | |
Element (JsonObject json) | |
JsonObject | getJson () |
Static Public Member Functions | |
static RPCError | unexpected (String expectedType, Response response) |
Static Public Attributes | |
static final int | UNEXPECTED_RESPONSE = 5 |
Additional Inherited Members | |
Protected Attributes inherited from org.dartlang.vm.service.element.Element | |
final JsonObject | json |
Package Functions inherited from org.dartlang.vm.service.element.Element | |
String | getAsString (String name) |
int | getAsInt (String name) |
boolean | getAsBoolean (String name) |
List< Integer > | getListInt (String memberName) |
List< String > | getListString (String memberName) |
List< List< Integer > > | getListListInt (String memberName) |
When an RPC encounters an error, it is provided in the error property of the response object. JSON-RPC errors always provide code, message, and data properties.
Here is an example error response for our streamListen request above. This error would be generated if we were attempting to subscribe to the GC stream multiple times from the same client.
{ "jsonrpc": "2.0", "error": { "code": 103, "message": "Stream already subscribed", "data": { "details": "The stream 'GC' is already subscribed" } } "id": "2" }
<p<blockquote>
In addition the error codes specified in the JSON-RPC spec, we use the following application specific error codes:
code | message | meaning ---- | ------- | ------- 100 | Feature is disabled | The operation is unable to complete because a feature is disabled 101 | VM must be paused | This operation is only valid when the VM is paused 102 | Cannot add breakpoint | The VM is unable to add a breakpoint at the specified line or function 103 | Stream already subscribed | The client is already subscribed to the specified _streamId_ 104 | Stream not subscribed | The client is not subscribed to the specified _streamId_
Definition at line 54 of file RPCError.java.
|
inline |
Definition at line 77 of file RPCError.java.
|
inline |
Definition at line 81 of file RPCError.java.
|
inline |
Definition at line 85 of file RPCError.java.
|
inline |
Definition at line 96 of file RPCError.java.
|
inline |
Definition at line 100 of file RPCError.java.
|
inlinestatic |
Definition at line 62 of file RPCError.java.
|
static |
The response code used by the client when it receives a response from the server that it did not expect. For example, it requested a library element but received a list.
Definition at line 60 of file RPCError.java.