private function createObject($class)
    {
        if (!class_exists($class)) {
            throw new JsonRpc\Exception\Method();
        }

        try {
            return new $class();
        } catch (Exception $e) {
            throw new JsonRpc\Exception\Method();
        }
    }