View Javadoc
1 /***
2 * CycleInDigraphException.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 * Is thrown if in a digraph a cycle is detected.
35 *
36 * @author Christoph Trutmann
37 * @version 1.0-beta
38 */
39 public class CycleInDigraphException extends Exception {
40
41 /***
42 * Standard error message.
43 */
44 private String m_message = "A cycle is detected in the current digraph.";
45
46 /***
47 * Constructor - Calls the constructor of the supperclass with no arguments.
48 */
49 public CycleInDigraphException() {
50 super();
51 }
52
53 /***
54 * Constructor with a specific message string. Calls the corresponding
55 * constructor of the superclass.
56 *
57 * @param msg Message string specified by the user.
58 */
59 public CycleInDigraphException(String msg) {
60 super(msg);
61 }
62
63 /***
64 * Gets the message of the wrapped class and displays it with the standard
65 * message of this exception.
66 *
67 * @return A message string composed of the standard message of this class
68 * plus the message of the wrapped <code>Exception</code>.
69 */
70 public String getMessage() {
71 if(super.getMessage() == null) {
72 return m_message;
73 } else {
74 return super.getMessage();
75 }
76 }
77 }
This page was automatically generated by Maven