Examples of NoSuchProjectException


Examples of com.google.gerrit.server.project.NoSuchProjectException

    final MetaDataUpdate md;
    try {
      md = metaDataUpdateFactory.create(projectName);
    } catch (RepositoryNotFoundException notFound) {
      throw new NoSuchProjectException(projectName);
    } catch (IOException e) {
      throw new OrmException(e);
    }
    try {
      // TODO We really should take advantage of the Git commit DAG and
View Full Code Here

Examples of com.google.gerrit.server.project.NoSuchProjectException

    final Project.NameKey projectName = projectState.getProject().getNameKey();
    Repository git;
    try {
      git = gitRepositoryManager.openRepository(projectName);
    } catch (RepositoryNotFoundException err) {
      throw new NoSuchProjectException(projectName);
    }
    try {
      Ref head = git.getRef(Constants.HEAD);
      if (head != null && head.isSymbolic()
          && GitRepositoryManager.REF_CONFIG.equals(head.getLeaf().getName())) {
        detail.setPermissionOnly(true);
      }
    } catch (IOException err) {
      throw new NoSuchProjectException(projectName);
    } finally {
      git.close();
    }

    return detail;
View Full Code Here

Examples of com.google.gerrit.server.project.NoSuchProjectException

    final ProjectControl project;
    try {
      project = projectControl.validateFor(nameKey);
      if (!project.allRefsAreVisible()) {
         // Pretend the project doesn't exist
        throw new NoSuchProjectException(nameKey);
      }
    } catch (NoSuchProjectException e) {
      rsp.sendError(HttpServletResponse.SC_NOT_FOUND);
      return;
    }
View Full Code Here

Examples of com.google.gerrit.server.project.NoSuchProjectException

    final MetaDataUpdate md;
    try {
      md = metaDataUpdateFactory.create(projectName);
    } catch (RepositoryNotFoundException notFound) {
      throw new NoSuchProjectException(projectName);
    }
    try {
      ProjectConfig config = ProjectConfig.read(md, base);
      Set<String> toDelete = scanSectionNames(config);
View Full Code Here

Examples of com.google.gerrit.server.project.NoSuchProjectException

    }
  }

  @Test
  public void testProjectNotVisible() throws Exception {
    final NoSuchProjectException err = new NoSuchProjectException(name);
    validate().andThrow(err);
    doReplay();
    try {
      new ListBranches(pcf, grm, name).call();
      fail("did not throw when expected not authorized");
View Full Code Here

Examples of edu.uga.galileo.voci.exception.NoSuchProjectException

    try {
      Configuration.getConnectionPool().executeQuery(qp);
    } catch (SQLException e) {
      Logger.fatal("Couldn't execute query", e);
      throw new NoSuchProjectException("A SQLException was the cause: "
          + e.getMessage());
    }

    if (qp.getResultCount() < 1) {
      throw new NoSuchProjectException("No such record exists.");
    }

    return createObjectFromQueryParser(Project.class, qp);
  }
View Full Code Here

Examples of edu.uga.galileo.voci.exception.NoSuchProjectException

    try {
      Configuration.getConnectionPool().executeInsertOrUpdate(qp);
    } catch (SQLException e) {
      Logger.error("Couldn't execute SQL", e);
      throw new NoSuchProjectException("SQLException root ("
          + e.getMessage() + ")");
    }
  }
View Full Code Here

Examples of edu.uga.galileo.voci.exception.NoSuchProjectException

      }
    } catch (SQLException e1) {
      Logger.fatal("Couldn't execute query", e1);
    }

    throw new NoSuchProjectException(
        "Couldn't retrieve project handle for ID " + projectId);
  }
View Full Code Here

Examples of edu.uga.galileo.voci.exception.NoSuchProjectException

      }
    } catch (SQLException e1) {
      Logger.fatal("Couldn't execute query", e1);
    }

    throw new NoSuchProjectException(
        "Couldn't retrieve project ID for handle " + projectHandle);
  }
View Full Code Here

Examples of edu.uga.galileo.voci.exception.NoSuchProjectException

    if (idToProjectHandleHolder.containsKey(projectId)) {
      return idToProjectHandleHolder.get(projectId);
    }

    throw new NoSuchProjectException("Project ID " + projectId
        + " couldn't be found.");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.