LfsUnauthorized.java

  1. /*
  2.  * Copyright (C) 2017, David Pursehouse <david.pursehouse@gmail.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. package org.eclipse.jgit.lfs.errors;

  11. import java.text.MessageFormat;

  12. import org.eclipse.jgit.lfs.internal.LfsText;

  13. /**
  14.  * Thrown when authorization was refused for an LFS operation.
  15.  *
  16.  * @since 4.7
  17.  */
  18. public class LfsUnauthorized extends LfsException {
  19.     private static final long serialVersionUID = 1L;

  20.     /**
  21.      * <p>Constructor for LfsUnauthorized.</p>
  22.      *
  23.      * @param operation
  24.      *            the operation that was attempted.
  25.      * @param name
  26.      *            the repository name.
  27.      */
  28.     public LfsUnauthorized(String operation, String name) {
  29.         super(MessageFormat.format(LfsText.get().lfsUnauthorized, operation,
  30.                 name));
  31.     }
  32. }