Example usage for org.eclipse.jgit.transport ServiceMayNotContinueException ServiceMayNotContinueException

List of usage examples for org.eclipse.jgit.transport ServiceMayNotContinueException ServiceMayNotContinueException

Introduction

In this page you can find the example usage for org.eclipse.jgit.transport ServiceMayNotContinueException ServiceMayNotContinueException.

Prototype

public ServiceMayNotContinueException(Throwable cause) 

Source Link

Document

Initialize with an "internal server error" message and a cause.

Usage

From source file:com.benhumphreys.jgitcassandra.CassandraRepositoryResolver.java

License:Apache License

@Override
public Repository open(DaemonClient client, String name) throws RepositoryNotFoundException,
        ServiceNotAuthorizedException, ServiceNotEnabledException, ServiceMayNotContinueException {
    CassandraRepository repo = repositories.get(name);
    if (repo == null) {
        try {//from  w w  w.  j  a va  2 s . c o m
            repo = new CassandraRepository(new DfsRepositoryDescription(sanitiseName(name)), storeconn);
        } catch (Exception e) {
            throw new ServiceMayNotContinueException(e);
        }
        repositories.put(name, repo);
    }
    return repo;
}

From source file:com.googlesource.gerrit.plugins.gitiles.Resolver.java

License:Apache License

@Override
public Repository open(HttpServletRequest req, String name)
        throws RepositoryNotFoundException, ServiceMayNotContinueException {
    Project.NameKey oldName = getNameKey(req);
    checkState(oldName == null, "Resolved multiple repositories on %s: %s, %s", req.getRequestURL(), oldName,
            name);//from   w  ww . ja  v a  2s  .  c  om
    Project.NameKey nameKey = new Project.NameKey(name);
    req.setAttribute(NAME_KEY_ATTRIBUTE, nameKey);
    try {
        return repoFactory.create(nameKey);
    } catch (NoSuchProjectException e) {
        throw new RepositoryNotFoundException(name, e);
    } catch (IOException e) {
        ServiceMayNotContinueException err = new ServiceMayNotContinueException(
                "error opening repository " + name);
        err.initCause(e);
        throw err;
    }
}