xref: /JGit/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnauthorized.java (revision 5c5f7c6b146b24f2bd4afae1902df85ad6e57ea3)
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 
11 package org.eclipse.jgit.lfs.errors;
12 
13 import java.text.MessageFormat;
14 
15 import org.eclipse.jgit.lfs.internal.LfsText;
16 
17 /**
18  * Thrown when authorization was refused for an LFS operation.
19  *
20  * @since 4.7
21  */
22 public class LfsUnauthorized extends LfsException {
23 	private static final long serialVersionUID = 1L;
24 
25 	/**
26 	 * <p>Constructor for LfsUnauthorized.</p>
27 	 *
28 	 * @param operation
29 	 *            the operation that was attempted.
30 	 * @param name
31 	 *            the repository name.
32 	 */
LfsUnauthorized(String operation, String name)33 	public LfsUnauthorized(String operation, String name) {
34 		super(MessageFormat.format(LfsText.get().lfsUnathorized, operation,
35 				name));
36 	}
37 }
38