01: /* *****************************************************************************
02: * UnknownAttributeException.java
03: * ****************************************************************************/
04:
05: /* J_LZ_COPYRIGHT_BEGIN *******************************************************
06: * Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
07: * Use is subject to license terms. *
08: * J_LZ_COPYRIGHT_END *********************************************************/
09:
10: package org.openlaszlo.compiler;
11:
12: import java.io.File;
13: import org.jdom.Element;
14: import org.jdom.JDOMException;
15: import org.xml.sax.SAXParseException;
16: import org.openlaszlo.utils.ChainedException;
17: import org.openlaszlo.sc.parser.ParseException;
18:
19: /** Represents an exception when an attribute with unknown type is encountered.
20: *
21: * @author Henry Minsky
22: */
23: public class UnknownAttributeException extends RuntimeException {
24: /** The element which contains this attribute */
25: private String elementName;
26: private String attrName;
27:
28: public UnknownAttributeException(String elementName, String attrName) {
29: this .elementName = elementName;
30: this .attrName = attrName;
31: }
32:
33: public UnknownAttributeException() {
34: }
35:
36: public String getElementName() {
37: return elementName;
38: }
39:
40: public String getName() {
41: return attrName;
42: }
43:
44: public void setElementName(String s) {
45: elementName = s;
46: }
47:
48: public void setName(String s) {
49: attrName = s;
50: }
51:
52: public String getMessage() {
53: return
54: /* (non-Javadoc)
55: * @i18n.test
56: * @org-mes="Unknown attribute named " + p[0]
57: */
58: org.openlaszlo.i18n.LaszloMessages.getMessage(
59: UnknownAttributeException.class.getName(), "051018-46",
60: new Object[] { attrName });
61: }
62:
63: }
|