1 /*
2 * Copyright (C) 2015, Google Inc. 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.transport;
12
13 import java.io.IOException;
14
15 /**
16 * An exception to be thrown when the write operation is aborted.
17 * <p>
18 * That can be thrown inside
19 * {@link org.eclipse.jgit.transport.ObjectCountCallback#setObjectCount(long)}.
20 *
21 * @since 4.1
22 */
23 public class WriteAbortedException extends IOException {
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * Construct a {@code WriteAbortedException}.
28 */
29 public WriteAbortedException() {
30 }
31
32 /**
33 * Construct a {@code WriteAbortedException}.
34 *
35 * @param s message describing the issue
36 */
37 public WriteAbortedException(String s) {
38 super(s);
39 }
40
41 /**
42 * Construct a {@code WriteAbortedException}.
43 *
44 * @param s
45 * message describing the issue
46 * @param why
47 * a lower level implementation specific issue.
48 */
49 public WriteAbortedException(String s, Throwable why) {
50 super(s, why);
51 }
52 }