View Javadoc
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  
11  package org.eclipse.jgit.errors;
12  
13  import java.io.IOException;
14  import java.text.MessageFormat;
15  
16  import org.eclipse.jgit.internal.JGitText;
17  
18  /**
19   * Thrown when a PackIndex uses an index version not supported by JGit.
20   *
21   * @since 4.5
22   */
23  public class UnsupportedPackIndexVersionException extends IOException {
24  	private static final long serialVersionUID = 1L;
25  
26  	/**
27  	 * Construct an exception.
28  	 *
29  	 * @param version
30  	 *            pack index version
31  	 */
32  	public UnsupportedPackIndexVersionException(int version) {
33  		super(MessageFormat.format(JGitText.get().unsupportedPackIndexVersion,
34  				Integer.valueOf(version)));
35  	}
36  }