code: def raise_error(self, error):
          
          exc = JSONRPCError(error)
          if self.raises_errors:
              raise exc
          return exc
docs: Recreates the exception.
  
          Creates a :py:class:`~tinyrpc.protocols.jsonrpc.JSONRPCError` instance
          and raises it.
          This allows the error, message and data attributes of the original
          exception to propagate into the client code.
  
          The :py:attr:`~tinyrpc.protocols.RPCProtocol.raises_error` flag controls if the exception obejct is
          raised or returned.
  
          :returns: the exception object if it is not allowed to raise it.
          :raises JSONRPCError: when the exception can be raised.
              The exception object will contain ``message``, ``code`` and optionally a
              ``data`` property.