1 /* 2 * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com> 3 * Copyright (C) 2006-2007, 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 12 package org.eclipse.jgit.errors; 13 14 import java.io.IOException; 15 import java.text.MessageFormat; 16 17 import org.eclipse.jgit.internal.JGitText; 18 19 /** 20 * Attempt to add an entry to a tree that already exists. 21 */ 22 public class EntryExistsException extends IOException { 23 private static final long serialVersionUID = 1L; 24 25 /** 26 * Construct an EntryExistsException when the specified name already 27 * exists in a tree. 28 * 29 * @param name workdir relative file name 30 */ 31 public EntryExistsException(String name) { 32 super(MessageFormat.format(JGitText.get().treeEntryAlreadyExists, name)); 33 } 34 }