ilene 2002/10/25 10:41:51
Modified: java/src/org/apache/xpath XPath.java
java/src/org/apache/xpath/res XPATHErrorResources.java
XPATHErrorResources.properties
Log:
Move a hardcoded string into the properties file.
Revision Changes Path
1.25 +13 -2 xml-xalan/java/src/org/apache/xpath/XPath.java
Index: XPath.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPath.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- XPath.java 13 May 2002 18:43:38 -0000 1.24
+++ XPath.java 25 Oct 2002 17:41:51 -0000 1.25
@@ -327,7 +327,12 @@
// e.printStackTrace();
String msg = e.getMessage();
- msg = (msg == null || msg.length()== 0)? "Unknown error in XPath" :
msg;
+
+ if (msg == null || msg.length() == 0) {
+ msg = XSLMessages.createXPATHMessage(
+ XPATHErrorResources.ER_XPATH_ERROR, null);
+
+ }
TransformerException te = new TransformerException(msg,
getLocator(), e);
ErrorListener el = xctxt.getErrorListener();
@@ -397,7 +402,13 @@
// e.printStackTrace();
String msg = e.getMessage();
- msg = (msg == null || msg.length()== 0)? "Unknown error in XPath" :
msg;
+
+ if (msg == null || msg.length() == 0) {
+ msg = XSLMessages.createXPATHMessage(
+ XPATHErrorResources.ER_XPATH_ERROR, null);
+
+ }
+
TransformerException te = new TransformerException(msg,
getLocator(), e);
ErrorListener el = xctxt.getErrorListener();
1.18 +3 -0
xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.java
Index: XPATHErrorResources.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- XPATHErrorResources.java 20 Sep 2002 13:48:48 -0000 1.17
+++ XPATHErrorResources.java 25 Oct 2002 17:41:51 -0000 1.18
@@ -562,6 +562,9 @@
/** Field ER_WRONG_NODETYPE */
public static final int ER_WRONG_NODETYPE = 115;
+/** Field ER_XPATH_ERROR */
+ public static final int ER_XPATH_ERROR = 116;
+
// Warnings...
/** Field WG_LOCALE_NAME_NOT_HANDLED */
1.10 +3 -0
xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.properties
Index: XPATHErrorResources.properties
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.properties,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XPATHErrorResources.properties 1 Oct 2002 16:01:29 -0000 1.9
+++ XPATHErrorResources.properties 25 Oct 2002 17:41:51 -0000 1.10
@@ -343,6 +343,9 @@
# ER_WRONG_NODETYPE
ER0115=The context node type is not supported.
+# ER_XPATH_ERROR
+ER0116=Unknown error in XPath
+
# WG_LOCALE_NAME_NOT_HANDLED
WR0001=locale name in the format-number function not yet handled!
# WG_PROPERTY_NOT_SUPPORTED
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]