peterreilly 2004/09/27 02:03:17
Modified: src/main/org/apache/tools/ant
UnsupportedAttributeException.java
UnsupportedElementException.java
RuntimeConfigurable.java UnknownElement.java
Log:
remove modifying exception code for unknown<attribute/element>exception
Revision Changes Path
1.2 +0 -17
ant/src/main/org/apache/tools/ant/UnsupportedAttributeException.java
Index: UnsupportedAttributeException.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/UnsupportedAttributeException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnsupportedAttributeException.java 24 Sep 2004 08:45:50 -0000
1.1
+++ UnsupportedAttributeException.java 27 Sep 2004 09:03:17 -0000
1.2
@@ -23,7 +23,6 @@
*/
public class UnsupportedAttributeException extends BuildException {
- private String myMessage;
private String attribute;
/**
@@ -34,7 +33,6 @@
public UnsupportedAttributeException(String msg, String attribute) {
super(msg);
this.attribute = attribute;
- this.myMessage = msg;
}
/**
@@ -46,19 +44,4 @@
return attribute;
}
- /**
- * Override throwable#getMessage
- * @return the message
- */
- public String getMessage() {
- return myMessage;
- }
-
- /**
- * Set the message
- * @param message a new message
- */
- public void setMessage(String message) {
- this.myMessage = message;
- }
}
1.2 +0 -23
ant/src/main/org/apache/tools/ant/UnsupportedElementException.java
Index: UnsupportedElementException.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/UnsupportedElementException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnsupportedElementException.java 24 Sep 2004 08:45:50 -0000 1.1
+++ UnsupportedElementException.java 27 Sep 2004 09:03:17 -0000 1.2
@@ -32,7 +32,6 @@
*/
public class UnsupportedElementException extends BuildException {
- private String myMessage = null;
private String element;
/**
@@ -52,27 +51,5 @@
*/
public String getElement() {
return element;
- }
-
- /**
- * Override throwable#getMessage
- * @return the message
- */
- public String getMessage() {
- if (myMessage == null) {
- return super.getMessage();
- } else {
- return myMessage;
- }
- }
-
- /**
- * Set the message (If not set already)
- * @param message a new message
- */
- public void setMessage(String message) {
- if (this.myMessage == null) {
- this.myMessage = message;
- }
}
}
1.54 +2 -3
ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java
Index: RuntimeConfigurable.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- RuntimeConfigurable.java 24 Sep 2004 08:45:50 -0000 1.53
+++ RuntimeConfigurable.java 27 Sep 2004 09:03:17 -0000 1.54
@@ -371,12 +371,11 @@
} else if (getElementTag() == null) {
throw be;
} else {
- be.setMessage(
+ throw new BuildException(
getElementTag()
+ " doesn't support the \""
+ be.getAttribute()
- + "\" attribute");
- throw be;
+ + "\" attribute", be);
}
} catch (BuildException be) {
if (name.equals("id")) {
1.83 +2 -3 ant/src/main/org/apache/tools/ant/UnknownElement.java
Index: UnknownElement.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- UnknownElement.java 24 Sep 2004 08:45:50 -0000 1.82
+++ UnknownElement.java 27 Sep 2004 09:03:17 -0000 1.83
@@ -342,11 +342,10 @@
}
}
} catch (UnsupportedElementException ex) {
- ex.setMessage(
+ throw new BuildException(
parentWrapper.getElementTag()
+ " doesn't support the nested \"" + ex.getElement()
- + "\" element.");
- throw ex;
+ + "\" element.", ex);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]