ServiceExtensionResponse.error constructor
Creates an error response to a service protocol extension RPC.
Requires errorCode
to be invalidParams or between extensionErrorMin and extensionErrorMax. Requires errorDetail
to be a JSON object encoded as a string. When forming the JSON-RPC message errorDetail
will be inlined directly.
Implementation
ServiceExtensionResponse.error(int errorCode, String errorDetail) : result = null, errorCode = errorCode, errorDetail = errorDetail { _validateErrorCode(errorCode); // TODO: When NNBD is complete, delete the following line. ArgumentError.checkNotNull(errorDetail, "errorDetail"); }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-developer/ServiceExtensionResponse/ServiceExtensionResponse.error.html