View Javadoc
1 /*** 2 * BadLayerDefinitionException.java 3 * 4 * Project: Dependency Tool 5 * 6 * WHEN WHO WHAT 7 * 06.06.2003 pko initial public release 8 * 25.06.2002 ctr creation 9 * 10 * Copyright 2003 ELCA Informatique SA 11 * Av. de la Harpe 22-24, 1000 Lausanne 13, Switzerland 12 * www.elca.ch 13 * 14 * This library is free software; you can redistribute it and/or 15 * modify it under the terms of the GNU Lesser General Public License 16 * as published by the Free Software Foundation; either version 2.1 of 17 * the License, or (at your option) any later version. 18 * 19 * This library is distributed in the hope that it will be useful, but 20 * WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 * Lesser General Public License for more details. 23 * 24 * You should have received a copy of the GNU Lesser General Public 25 * License along with this library; if not, write to the Free Software 26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 27 * USA 28 */ 29 30 package ch.elca.dependency.exception; 31 32 /*** 33 * Is thrown if the user defined layers are invalid. 34 * 35 * @author Pawel Kowalski 36 * @version 1.0-beta 37 */ 38 public class BadLayerDefinitionException extends Exception { 39 40 /*** 41 * Standard error message. 42 */ 43 private String m_message = "Invalid user layer definition."; 44 45 /*** 46 * Constructor - Calls the constructor of the supperclass with no arguments. 47 */ 48 public BadLayerDefinitionException() { 49 super(); 50 } 51 52 /*** 53 * Constructor with a specific message string. Calls the corresponding 54 * constructor of the superclass. 55 * 56 * @param msg Message string specified by the user. 57 */ 58 public BadLayerDefinitionException(String msg) { 59 super(msg); 60 } 61 62 /*** 63 * Constructor with an other exception specified as an argument. 64 * The message of the given exception is set to this exception class. 65 * 66 * @param e Original exception. 67 */ 68 public BadLayerDefinitionException(Exception e){ 69 super(e.getMessage()); 70 } 71 72 /*** 73 * Gets the message of the wrapped class and displays it with the standard 74 * message of this exception. 75 * 76 * @return A message string composed of the standard message of this class 77 * plus the message of the wrapped <code>Exception</code>. 78 */ 79 public String getMessage() { 80 if( super.getMessage() == null ){ 81 return m_message; 82 } else { 83 return super.getMessage(); 84 } 85 } 86 }

This page was automatically generated by Maven