Package org.tmatesoft.hg.repo

Examples of org.tmatesoft.hg.repo.HgInvalidStateException.initCause()


      try {
        sha1 = MessageDigest.getInstance("SHA-1");
      } catch (NoSuchAlgorithmException ex) {
        // could hardly happen, JDK from Sun always has sha1.
        HgInvalidStateException t = new HgInvalidStateException("Need SHA-1 algorithm for nodeid calculation");
        t.initCause(ex);
        throw t;
      }
    }
    return sha1;
  }
View Full Code Here


        return rv;
      } catch (CancelledException ex) {
        // TODO likely it was bad idea to throw cancelled exception from content()
        // deprecate and provide alternative?
        HgInvalidStateException ise = new HgInvalidStateException("ByteArrayChannel never throws CancelledException");
        ise.initCause(ex);
        throw ise;
      }
    }
   
    private Pair<Integer,LineSequence> checkCache(int fileRevIndex) {
View Full Code Here

    try {
      execute(collector);
    } catch (HgCallbackTargetException ex) {
      // see below for CanceledException
      HgInvalidStateException t = new HgInvalidStateException("Internal error");
      t.initCause(ex);
      throw t;
    } catch (CancelledException ex) {
      // can't happen as long as our CollectHandler doesn't throw any exception
      HgInvalidStateException t = new HgInvalidStateException("Internal error");
      t.initCause(ex);
View Full Code Here

      t.initCause(ex);
      throw t;
    } catch (CancelledException ex) {
      // can't happen as long as our CollectHandler doesn't throw any exception
      HgInvalidStateException t = new HgInvalidStateException("Internal error");
      t.initCause(ex);
      throw t;
    }
    return collector.getChanges();
  }
View Full Code Here

      }
    } catch (IOException ex) {
      throw new HgIOException(ex.getMessage(), null); // XXX not a nice idea to throw IOException from BundleGenerator#create
    } catch (HgRepositoryNotFoundException ex) {
      final HgInvalidStateException e = new HgInvalidStateException("Failed to load a just-created bundle");
      e.initCause(ex);
      throw new HgLibraryFailureException(e);
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
    } finally {
      progress.done();
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.