6 * The JsonRpcMethodException is emitted by a JSON-RPC client if a method call returns an error.
8 * This differs from an protocol-error or client-error. In this case, all JSON-RPC traffic has
9 * been well-formed; but the payload indicates that a specific method-call failed.
11 class JsonRpcMethodException
extends \CRM_Core_Exception
{
19 public function __construct(array $jsonRpcError) {
20 parent
::__construct($jsonRpcError['error']['message'] ??
'Unknown JSON-RPC error',
21 $jsonRpcError['error']['code'] ??
0,
22 $jsonRpcError['error']['data'] ??
[]
24 $this->raw
= $jsonRpcError;