original_string: public function handleRpcErrors($error)
      {
          switch ($error['code']) {
              case -32600:
                  throw new \InvalidArgumentException('Invalid Request: '. $error['message']);
              case -32601:
                  throw new \BadFunctionCallException('Procedure not found: '. $error['message']);
              case -32602:
                  throw new \InvalidArgumentException('Invalid arguments: '. $error['message']);
              case -32603:
                  throw new \RuntimeException('Internal Error: '. $error['message']);
              default:
                  throw new \RuntimeException('Invalid request/response: '. $error['message'], $error['code']);
          }
      }
code: public function handleRpcErrors($error)
      {
          switch ($error['code']) {
              case -32600:
                  throw new \InvalidArgumentException('Invalid Request: '. $error['message']);
              case -32601:
                  throw new \BadFunctionCallException('Procedure not found: '. $error['message']);
              case -32602:
                  throw new \InvalidArgumentException('Invalid arguments: '. $error['message']);
              case -32603:
                  throw new \RuntimeException('Internal Error: '. $error['message']);
              default:
                  throw new \RuntimeException('Invalid request/response: '. $error['message'], $error['code']);
          }
      }
code_tokens: public function handleRpcErrors ( $ error ) { switch ( $ error [ 'code' ] ) { case - 32600 : throw new \ InvalidArgumentException ( 'Invalid Request: ' . $ error [ 'message' ] ) ; case - 32601 : throw new \ BadFunctionCallException ( 'Procedure not found: ' . $ error [ 'message' ] ) ; case - 32602 : throw new \ InvalidArgumentException ( 'Invalid arguments: ' . $ error [ 'message' ] ) ; case - 32603 : throw new \ RuntimeException ( 'Internal Error: ' . $ error [ 'message' ] ) ; default : throw new \ RuntimeException ( 'Invalid request/response: ' . $ error [ 'message' ] , $ error [ 'code' ] ) ; } }
docstring: Process JSON-RPC errors
  
  @param $error
  @throws BadFunctionCallException
  @throws InvalidArgumentException
  @throws RuntimeException
docstring_tokens: Process JSON - RPC errors