1 /* 2 * The contents of this file are subject to the terms of the Common Development and 3 * Distribution License (the License). You may not use this file except in compliance with the 4 * License. 5 * 6 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 7 * specific language governing permission and limitations under the License. 8 * 9 * When distributing Covered Software, include this CDDL Header Notice in each file and include 10 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 11 * Header, with the fields enclosed by brackets [] replaced by your own identifying 12 * information: "Portions Copyrighted [year] [name of copyright owner]". 13 * 14 * Copyright © 2011 ForgeRock AS. All rights reserved. 15 */ 16 17 package org.forgerock.json.resource; 18 19 // JSON Resource 20 21 /** 22 * An exception that is thrown during an operation on a resource when the server 23 * encountered an unexpected condition which prevented it from fulfilling the 24 * request. 25 */ 26 public class InternalServerErrorException extends ResourceException { 27 28 private static final long serialVersionUID = 1L; 29 30 /** 31 * Constructs a new exception with {@code null} as its detail message. 32 */ 33 public InternalServerErrorException() { 34 super(ResourceException.INTERNAL_ERROR); 35 } 36 37 /** 38 * Constructs a new exception with the specified detail message. 39 * 40 * @param message 41 * The detail message. 42 */ 43 public InternalServerErrorException(final String message) { 44 super(ResourceException.INTERNAL_ERROR, message); 45 } 46 47 /** 48 * Constructs a new exception with the specified detail message and cause. 49 * 50 * @param message 51 * The detail message. 52 * @param cause 53 * The exception which caused this exception to be thrown. 54 */ 55 public InternalServerErrorException(final String message, final Throwable cause) { 56 super(ResourceException.INTERNAL_ERROR, message, cause); 57 } 58 59 /** 60 * Constructs a new exception with the specified cause. 61 * 62 * @param cause 63 * The exception which caused this exception to be thrown. 64 */ 65 public InternalServerErrorException(final Throwable cause) { 66 super(ResourceException.INTERNAL_ERROR, cause); 67 } 68 }