001 /*
002 * The contents of this file are subject to the terms
003 * of the Common Development and Distribution License
004 * (the "License"). You may not use this file except
005 * in compliance with the License.
006 *
007 * You can obtain a copy of the license at
008 * http://www.opensource.org/licenses/cddl1.php
009 * See the License for the specific language governing
010 * permissions and limitations under the License.
011 */
012
013 /*
014 * UriBuilderException.java
015 *
016 * Created on August 22, 2007, 4:41 PM
017 *
018 */
019
020 package javax.ws.rs.core;
021
022 /**
023 * A runtime exception thrown by {@link UriBuilder#build} methods when a {@link
024 * java.net.URI} cannot be constructed based on the current state of the
025 * builder.
026 */
027 public class UriBuilderException extends java.lang.RuntimeException {
028 private static final long serialVersionUID = 956255913370721193L;
029
030 /**
031 * Creates a new instance of <code>UriBuilderException</code> without detail message.
032 */
033 public UriBuilderException() {
034 }
035
036
037 /**
038 * Constructs an instance of <code>UriBuilderException</code> with the specified detail message.
039 * @param msg the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
040 */
041 public UriBuilderException(String msg) {
042 super(msg);
043 }
044
045 /**
046 * Constructs an instance of <code>UriBuilderException</code> with the specified detail message and cause.
047 * <p>Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.
048 * @param msg the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
049 * @param cause the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
050 */
051 public UriBuilderException(String msg, Throwable cause) {
052 super(msg, cause);
053 }
054
055 /**
056 * Constructs a new exception with the specified cause and a detail message
057 * of (<code>cause==null ? null : cause.toString()</code>) (which typically contains
058 * the class and detail message of cause). This constructor is useful
059 * for exceptions that are little more than wrappers for other throwables.
060 * @param cause the original exception
061 */
062 public UriBuilderException(Throwable cause) {
063 super(cause);
064 }
065 }