Source code for /engineering/autohit-2003/src/autohit/common/channels/ChannelException.javaOriginal file ChannelException.java
   1 /**
   2  * AUTOHIT 2003
   3  * Copyright Erich P Gatejen (c) 1989,1997,2003,2004
   4  * 
   5  * This program is free software; you can redistribute it and/or modify 
   6  * it under the terms of the GNU General Public License as published by 
   7  * the Free Software Foundation; either version 2 of the License, or (at
   8  * your option) any later version.
   9  * This program is distributed in the hope that it will be useful, but
  10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12  * more details.
  13  * 
  14  * You should have received a copy of the GNU General Public License along
  15  * with this program; if not, write to the Free Software Foundation, Inc.,
  16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17  *
  18  * Additional license information can be found in the documentation.
  19  * @author Erich P Gatejen
  20  */
  21 package autohit.common.channels;
  22 
  23 import autohit.common.AutohitException;
  24 
  25 /**
  26  * A Channel exception.  A numeric error number can be set.
  27  *
  28  * @author Erich P. Gatejen
  29  * @version 1.0
  30  * <i>Version History</i>
  31  * <code>EPG - Initial - 28Apr03<br>
  32  * EPG - Add exception chaining - 13Jun03</code> 
  33  * 
  34  */
  35 public class ChannelException extends AutohitException {
  36 
  37 	final static long serialVersionUID = 1;
  38 	
  39 	/**
  40 	 *  Default Constructor.
  41 	 */
  42 	public ChannelException() {
  43 		super("Generic ChannelException", CODE_CHANNEL_ERROR);
  44 	}
  45 
  46 	/**
  47 	 *  Message constructor
  48 	 * @param message text message for exception
  49 	 */
  50 	public ChannelException(String message) {
  51 		super(message, CODE_CHANNEL_ERROR);
  52 	}
  53 
  54 	/**
  55 	 *  Message constructor
  56 	 * @param n numeric error
  57 	 */
  58 	public ChannelException(int n) {
  59 		super("Numbered ChannelException", n);
  60 	}
  61 
  62 	/**
  63 	 *  Message constructor
  64 	 * @param message text message for exception
  65 	 * @param n numeric error
  66 	 */
  67 	public ChannelException(String message, int n) {
  68 		super(message, n);
  69 	}
  70 
  71 	/**
  72 	 *  Message constructor with cause
  73 	 * @param message text message for exception
  74 	 * @param theCause for exception chaining
  75 	 */
  76 	public ChannelException(String message, Throwable theCause) {
  77 		super(message, CODE_CHANNEL_ERROR);
  78 	}
  79 
  80 	/**
  81 	 *  Message constructor with cause
  82 	 * @param n numeric error
  83 	 * @param theCause for exception chaining
  84 	 */
  85 	public ChannelException(int n, Throwable theCause) {
  86 		super("Numbered ChannelException", n);
  87 	}
  88 
  89 	/**
  90 	 *  Message constructor with cause
  91 	 * @param message text message for exception
  92 	 * @param n numeric error
  93 	 * @param theCause for exception chaining
  94 	 */
  95 	public ChannelException(String message, int n, Throwable theCause) {
  96 		super(message, n, theCause);
  97 		numeric = n;
  98 	}
  99 
 100 }