InvalidPathException.java

  1. /*
  2.  * Copyright (C) 2011, Robin Rosenberg 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.dircache;

  11. import java.text.MessageFormat;

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

  13. /**
  14.  * Thrown when JGit detects and refuses to use an invalid path
  15.  *
  16.  * @since 2.0
  17.  */
  18. public class InvalidPathException extends IllegalArgumentException {

  19.     private static final long serialVersionUID = 1L;

  20.     /**
  21.      * Constructor for InvalidPathException
  22.      *
  23.      * @param path
  24.      *            the invalid path
  25.      */
  26.     public InvalidPathException(String path) {
  27.         this(JGitText.get().invalidPath, path);
  28.     }

  29.     InvalidPathException(String messagePattern, Object... arguments) {
  30.         super(MessageFormat.format(messagePattern, arguments));
  31.     }
  32. }