UnsupportedPackIndexVersionException.java

  1. /*
  2.  * Copyright (C) 2017, Matthias Sohn <matthias.sohn@sap.com> and others
  3.  *
  4.  * This program and the accompanying materials are made available under the
  5.  * terms of the Eclipse Distribution License v. 1.0 which is available at
  6.  * https://www.eclipse.org/org/documents/edl-v10.php.
  7.  *
  8.  * SPDX-License-Identifier: BSD-3-Clause
  9.  */

  10. package org.eclipse.jgit.errors;

  11. import java.io.IOException;
  12. import java.text.MessageFormat;

  13. import org.eclipse.jgit.internal.JGitText;

  14. /**
  15.  * Thrown when a PackIndex uses an index version not supported by JGit.
  16.  *
  17.  * @since 4.5
  18.  */
  19. public class UnsupportedPackIndexVersionException extends IOException {
  20.     private static final long serialVersionUID = 1L;

  21.     /**
  22.      * Construct an exception.
  23.      *
  24.      * @param version
  25.      *            pack index version
  26.      */
  27.     public UnsupportedPackIndexVersionException(int version) {
  28.         super(MessageFormat.format(JGitText.get().unsupportedPackIndexVersion,
  29.                 Integer.valueOf(version)));
  30.     }
  31. }