blob: 38982fdf23e77a5feccd3d3a220635bb24d6a6c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*
* Copyright (C) 2009, Google Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.errors;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import org.eclipse.jgit.internal.JGitText;
/**
* Thrown when a Pack previously failed and is known to be unusable
*/
public class PackInvalidException extends IOException {
private static final long serialVersionUID = 1L;
/**
* Construct a pack invalid error with cause.
*
* @param path
* path of the invalid pack file.
* @param cause
* cause of the pack file becoming invalid.
* @since 4.5.7
*/
public PackInvalidException(File path, Throwable cause) {
this(path.getAbsolutePath(), cause);
}
/**
* Construct a pack invalid error with cause.
*
* @param path
* path of the invalid pack file.
* @param cause
* cause of the pack file becoming invalid.
* @since 4.5.7
*/
public PackInvalidException(String path, Throwable cause) {
super(MessageFormat.format(JGitText.get().packFileInvalid, path), cause);
}
}
|