001    /*
002     * Copyright (c) 2005 Jens Schou, Staffan Gustafsson, Björn Lanneskog, 
003     * Einar Pehrson and Sebastian Kekkonen
004     *
005     * This file is part of
006     * CleanSheets Extension for Test Cases
007     *
008     * CleanSheets Extension for Test Cases is free software; you can
009     * redistribute it and/or modify it under the terms of the GNU General Public
010     * License as published by the Free Software Foundation; either version 2 of
011     * the License, or (at your option) any later version.
012     *
013     * CleanSheets Extension for Test Cases is distributed in the hope that
014     * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
015     * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016     * See the GNU General Public License for more details.
017     *
018     * You should have received a copy of the GNU General Public License
019     * along with CleanSheets Extension for Test Cases; if not, write to the
020     * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
021     * Boston, MA  02111-1307  USA
022     */
023    package csheets.ext.test;
024    
025    /**
026     * An exception that is thrown if a user enters a duplicate
027     * test case param of type USER_ENTERED.
028     * @author Jens Schou
029     */
030    public class DuplicateUserTCPException extends Exception {
031    
032            /** The serialVersionUID of the DuplicateUserTCPException.java */
033            private static final long serialVersionUID = 8640730494411675302L;
034    
035            /** The value that caused the exception */
036            private Object value;
037    
038            /**
039             * Creates a new duplicate user entered TCP exception.
040             * @param value the value that caused the exception
041             */
042            public DuplicateUserTCPException(Object value){
043                    this(value, null);
044            }
045    
046            /**
047             * Creates a new duplicate user entered TCP exception.
048             * @param value the value that caused the exception
049             * @param message a message that describes what happened
050             */
051            public DuplicateUserTCPException(Object value, String message){
052                    super(message);
053                    this.value = value;
054            }
055    
056            /**
057             * Returns the value that caused the exception.
058             * @return the value that caused the exception
059             */
060            public Object getValue() {
061                    return value;
062            }
063    }