KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openlaszlo > compiler > UnknownAttributeException


1 /* *****************************************************************************
2  * UnknownAttributeException.java
3 * ****************************************************************************/

4
5 /* J_LZ_COPYRIGHT_BEGIN *******************************************************
6 * Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
7 * Use is subject to license terms. *
8 * J_LZ_COPYRIGHT_END *********************************************************/

9
10 package org.openlaszlo.compiler;
11 import java.io.File JavaDoc;
12 import org.jdom.Element;
13 import org.jdom.JDOMException;
14 import org.xml.sax.SAXParseException JavaDoc;
15 import org.openlaszlo.utils.ChainedException;
16 import org.openlaszlo.sc.parser.ParseException;
17
18 /** Represents an exception when an attribute with unknown type is encountered.
19  *
20  * @author Henry Minsky
21  */

22 public class UnknownAttributeException extends RuntimeException JavaDoc {
23     /** The element which contains this attribute */
24     private String JavaDoc elementName;
25     private String JavaDoc attrName;
26
27     public UnknownAttributeException (String JavaDoc elementName, String JavaDoc attrName) {
28         this.elementName = elementName;
29         this.attrName = attrName;
30     }
31
32     public UnknownAttributeException () { }
33
34     public String JavaDoc getElementName() { return elementName; }
35     public String JavaDoc getName() { return attrName; }
36
37     public void setElementName(String JavaDoc s) { elementName = s; }
38     public void setName(String JavaDoc s) { attrName = s; }
39     
40     public String JavaDoc getMessage () {
41         return "Unknown attribute named "+attrName;
42     }
43
44 }
45
Popular Tags