001    package com.softnetConsult.utils.exceptions;
002    
003    /**
004     * A Throwable Error that should be thrown to report a condition that indicates
005     * that there is a bug in the program. This class exists to faciliate brievity
006     * and expressiveness of the source code. 
007     *  
008     * <p style="font-size:smaller;">This product includes software developed by the
009     *    <strong>SoftNet-Consult Java Utility Library</strong> project and its contributors.<br />
010     *    (<a href="http://java-tools.sourceforge.net" target="_blank">http://java-tools.sourceforge.net</a>)<br />
011     *    Copyright (c) 2007-2008 SoftNet-Consult.<br />
012     *    Copyright (c) 2007-2008 G. Paperin.<br />
013     *    All rights reserved.
014     * </p>
015     * <p style="font-size:smaller;">File: Bug.java<br />
016     *    Library API version: {@value com.softnetConsult.utils.APIProperties#apiVersion}<br />
017     *    Java compliance version: {@value com.softnetConsult.utils.APIProperties#javaComplianceVersion}
018     * </p>
019     * <p style="font-size:smaller;">Redistribution and use in source and binary forms, with or
020     *    without modification, are permitted provided that the following terms and conditions are met:
021     * </p>
022     * <p style="font-size:smaller;">1. Redistributions of source code must retain the above
023     *    acknowledgement of the SoftNet-Consult Java Utility Library project, the above copyright
024     *    notice, this list of conditions and the following disclaimer.<br />
025     *    2. Redistributions in binary form must reproduce the above acknowledgement of the
026     *    SoftNet-Consult Java Utility Library project, the above copyright notice, this list of
027     *    conditions and the following disclaimer in the documentation and/or other materials
028     *    provided with the distribution.<br />
029     *    3. All advertising materials mentioning features or use of this software or any derived
030     *    software must display the following acknowledgement:<br />
031     *    <em>This product includes software developed by the SoftNet-Consult Java Utility Library
032     *    project and its contributors.</em>
033     * </p>
034     * <p style="font-size:smaller;">THIS SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY
035     *    OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
036     *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  NONINFRINGEMENT. IN NO EVENT SHALL
037     *    THE AUTHORS, CONTRIBUTORS OR COPYRIGHT  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
038     *    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING  FROM, OUT OF OR
039     *    IN CONNECTION WITH THE SOFTWARE OR THE USE OR  OTHER DEALINGS IN THE SOFTWARE.
040     * </p> 
041     * @author Greg Paperin (<a href="http://www.paperin.org" target="_blank">http://www.paperin.org</a>)
042     * @version {@value com.softnetConsult.utils.APIProperties#apiVersion}
043     */
044    public class Bug extends Error {
045    
046    /**
047     * Constructs a new Bug with {@code null} as its detail message.
048     * @see Error#Error()
049     */
050    public Bug() { }
051    
052    /**
053     * Constructs a new Bug with the specified detail message.
054     * 
055     * @param message The detail message
056     * (which is saved for later retrieval by the {@code Throwable.getMessage()} method).
057     * @see Error#Error(String)
058     */
059    public Bug(String message) {
060            super(message);
061    }
062    
063    /**
064     * Constructs a new Bug with the specified cause and a detail message of
065     * {@code (cause==null ? null : cause.toString())} (which typically contains the class and
066     * detail message of cause).
067     * This constructor is useful for errors that are little more than wrappers for other throwables.
068     * 
069     * @param cause The cause (which is saved for later retrieval by the {@code Throwable.getCause()} method).
070     * (A {@code null} value is permitted, and indicates that the cause is nonexistent or unknown.)
071     * @see Error#Error(Throwable)
072     */
073    public Bug(Throwable cause) {
074            super(cause);
075    }
076    
077    /**
078     * Constructs a new Bug with the specified detail message and cause.
079     * Note that the detail message associated with {@code cause} is not automatically incorporated
080     * in this error's detail message.
081     *  
082     * @param message The detail message
083     * (which is saved for later retrieval by the {@code Throwable.getMessage()} method).
084     * @param cause The cause (which is saved for later retrieval by the {@code Throwable.getCause()} method).
085     * (A {@code null} value is permitted, and indicates that the cause is nonexistent or unknown.)
086     * @see Error#Error(String, Throwable)
087     */
088    public Bug(String message, Throwable cause) {
089            super(message, cause);
090    }
091    
092    } // public class Bug