protected function RpcRequestFactory::newException in JSON-RPC 8
Same name and namespace in other branches
- 2.x src/Shaper/RpcRequestFactory.php \Drupal\jsonrpc\Shaper\RpcRequestFactory::newException()
Helper for creating an error RPC response exception.
Parameters
\Drupal\jsonrpc\Object\Error $error: The JSON-RPC Error.
\Shaper\Util\Context $context: The JSON-RPC request context.
Return value
\Drupal\jsonrpc\Exception\JsonRpcException The new exception object.
1 call to RpcRequestFactory::newException()
- RpcRequestFactory::denormalizeParams in src/
Shaper/ RpcRequestFactory.php - Denormalizes a JSON-RPC request object's parameters.
File
- src/
Shaper/ RpcRequestFactory.php, line 224
Class
- RpcRequestFactory
- Creates RPC Request objects.
Namespace
Drupal\jsonrpc\ShaperCode
protected function newException(Error $error, Context $context) {
return JsonRpcException::fromError($error, $context[static::REQUEST_ID_KEY], $context[static::REQUEST_VERSION_KEY]);
}