You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/07/31 00:39:43 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/compiler Compiler.java
sboag 00/07/30 15:39:43
Modified: java/src/org/apache/xpath/compiler Compiler.java
Log:
Added constructor so Locator would be set. Also, fix error handling bug.
Revision Changes Path
1.2 +19 -4 xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java
Index: Compiler.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Compiler.java 2000/07/05 14:45:35 1.1
+++ Compiler.java 2000/07/30 22:39:43 1.2
@@ -43,6 +43,19 @@
public class Compiler extends OpMap
{
+ public Compiler(ErrorHandler errorHandler,
+ Locator locator)
+ {
+ m_errorHandler = errorHandler;
+ m_locator = locator;
+ }
+
+ public Compiler()
+ {
+ m_errorHandler = null;
+ m_locator = null;
+ }
+
/**
* <meta name="usage" content="advanced"/>
* Execute the XPath object from a given opcode position.
@@ -57,6 +70,7 @@
throws org.xml.sax.SAXException
{
int op = m_opMap[opPos];
+ // System.out.println(getPatternString()+"op: "+op);
switch(op)
{
case OpCodes.OP_XPATH: return compile(opPos+2);
@@ -781,10 +795,11 @@
m_errorHandler.fatalError(te);
else
{
- System.out.println(te.getMessage()
- +"; file "+te.getSystemId()
- +"; line "+te.getLineNumber()
- +"; column "+te.getColumnNumber());
+ // System.out.println(te.getMessage()
+ // +"; file "+te.getSystemId()
+ // +"; line "+te.getLineNumber()
+ // +"; column "+te.getColumnNumber());
+ throw te;
}
}