View Javadoc
1   /*
2    * Copyright (C) 2010, Christian Halstrick <christian.halstrick@sap.com>,
3    * Copyright (C) 2010, Stefan Lay <stefan.lay@sap.com> 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  package org.eclipse.jgit.errors;
12  
13  import org.eclipse.jgit.transport.URIish;
14  
15  /**
16   * An exception thrown when a {@link org.eclipse.jgit.transport.CredentialItem}
17   * is requested from a {@link org.eclipse.jgit.transport.CredentialsProvider}
18   * which is not supported by this provider.
19   */
20  public class UnsupportedCredentialItem extends RuntimeException {
21  	private static final long serialVersionUID = 1L;
22  
23  	/**
24  	 * Constructs an UnsupportedCredentialItem with the specified detail message
25  	 * prefixed with provided URI.
26  	 *
27  	 * @param uri
28  	 *            URI used for transport
29  	 * @param s
30  	 *            message
31  	 */
32  	public UnsupportedCredentialItem(URIish uri, String s) {
33  		super(uri.setPass(null) + ": " + s); //$NON-NLS-1$
34  	}
35  }