You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RevWalkException.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
  3. * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> and others
  4. *
  5. * This program and the accompanying materials are made available under the
  6. * terms of the Eclipse Distribution License v. 1.0 which is available at
  7. * https://www.eclipse.org/org/documents/edl-v10.php.
  8. *
  9. * SPDX-License-Identifier: BSD-3-Clause
  10. */
  11. package org.eclipse.jgit.errors;
  12. import org.eclipse.jgit.internal.JGitText;
  13. /**
  14. * Indicates a checked exception was thrown inside of
  15. * {@link org.eclipse.jgit.revwalk.RevWalk}.
  16. * <p>
  17. * Usually this exception is thrown from the Iterator created around a RevWalk
  18. * instance, as the Iterator API does not allow checked exceptions to be thrown
  19. * from hasNext() or next(). The {@link java.lang.Exception#getCause()} of this
  20. * exception is the original checked exception that we really wanted to throw
  21. * back to the application for handling and recovery.
  22. */
  23. public class RevWalkException extends RuntimeException {
  24. private static final long serialVersionUID = 1L;
  25. /**
  26. * Create a new walk exception an original cause.
  27. *
  28. * @param cause
  29. * the checked exception that describes why the walk failed.
  30. */
  31. public RevWalkException(Throwable cause) {
  32. super(JGitText.get().walkFailure, cause);
  33. }
  34. }