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

This page was automatically generated by Maven