2 * This document is a part of the source code and related artifacts
3 * for CollectionSpace, an open source collections management system
4 * for museums and related institutions:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright 2009 University of California at Berkeley
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
16 * https://source.collectionspace.org/collection-space/LICENSE.txt
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
25 package org.collectionspace.services.common.repository;
31 public class BadRequestException extends Exception {
34 * Creates a new instance of <code>BadRequestException</code> without detail message.
36 public BadRequestException() {
41 * Constructs an instance of <code>BadRequestException</code> with the specified detail message.
42 * @param msg the detail message.
44 public BadRequestException(String msg) {
50 * Constructs a new exception with the specified detail message and
51 * cause. <p>Note that the detail message associated with
52 * <code>cause</code> is <i>not</i> automatically incorporated in
53 * this exception's detail message.
55 * @param message the detail message (which is saved for later retrieval
56 * by the {@link #getMessage()} method).
57 * @param cause the cause (which is saved for later retrieval by the
58 * {@link #getCause()} method). (A <tt>null</tt> value is
59 * permitted, and indicates that the cause is nonexistent or
63 public BadRequestException(String message, Throwable cause) {
64 super(message, cause);
68 * Constructs a new exception with the specified cause and a detail
69 * message of <tt>(cause==null ? null : cause.toString())</tt> (which
70 * typically contains the class and detail message of <tt>cause</tt>).
71 * This constructor is useful for exceptions that are little more than
72 * wrappers for other throwables (for example, {@link
73 * java.security.PrivilegedActionException}).
75 * @param cause the cause (which is saved for later retrieval by the
76 * {@link #getCause()} method). (A <tt>null</tt> value is
77 * permitted, and indicates that the cause is nonexistent or
81 public BadRequestException(Throwable cause) {