1 package com.icl.saxon.expr; 2 import com.icl.saxon.*; 3 import java.util.*; 4 5 6 11 12 public class ErrorExpression extends Expression { 13 14 private XPathException exception; 16 20 21 public ErrorExpression(XPathException exception) { 22 this.exception = exception; 23 }; 24 25 29 30 public Value evaluate(Context c) throws XPathException { 31 throw exception; 32 } 33 34 38 39 public int getDataType() { 40 return Value.ANY; 41 } 42 43 48 49 public int getDependencies() { 50 return 0; 51 } 52 53 61 62 public Expression reduce(int dependencies, Context context) throws XPathException { 63 return this; 64 } 65 66 69 70 public void display(int level) { 71 System.err.println(indent(level) + "**ERROR** (" + exception.getMessage() + ")"); 72 } 73 74 } 75 76 | Popular Tags |