1 package org.collectionspace.services.common.document;
3 public class DocumentReferenceException extends DocumentException {
7 private static final long serialVersionUID = 1L;
8 final public static int HTTP_CODE = 500;
11 * Creates a new instance of <code>DocumentNotFoundException</code> without detail message.
13 public DocumentReferenceException() {
14 setErrorCode(HTTP_CODE);
18 * Constructs an instance of <code>DocumentNotFoundException</code> with the specified detail message.
19 * @param msg the detail message.
21 public DocumentReferenceException(String msg) {
23 setErrorCode(HTTP_CODE);
27 * Constructs a new exception with the specified detail message and
28 * cause. <p>Note that the detail message associated with
29 * <code>cause</code> is <i>not</i> automatically incorporated in
30 * this exception's detail message.
32 * @param message the detail message (which is saved for later retrieval
33 * by the {@link #getMessage()} method).
34 * @param cause the cause (which is saved for later retrieval by the
35 * {@link #getCause()} method). (A <tt>null</tt> value is
36 * permitted, and indicates that the cause is nonexistent or
40 public DocumentReferenceException(String message, Throwable cause) {
41 super(message, cause);
42 setErrorCode(HTTP_CODE);
46 * Constructs a new exception with the specified cause and a detail
47 * message of <tt>(cause==null ? null : cause.toString())</tt> (which
48 * typically contains the class and detail message of <tt>cause</tt>).
49 * This constructor is useful for exceptions that are little more than
50 * wrappers for other throwables (for example, {@link
51 * java.security.PrivilegedActionException}).
53 * @param cause the cause (which is saved for later retrieval by the
54 * {@link #getCause()} method). (A <tt>null</tt> value is
55 * permitted, and indicates that the cause is nonexistent or
59 public DocumentReferenceException(Throwable cause) {
61 setErrorCode(HTTP_CODE);