Author: karthick
Date: Wed Aug 12 20:21:43 2009
New Revision: 803698

URL: http://svn.apache.org/viewvc?rev=803698&view=rev
Log:
Don't swallow XQuery exceptions during compilation.

Modified:
    
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPathMessages.java
    
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java

Modified: 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPathMessages.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPathMessages.java?rev=803698&r1=803697&r2=803698&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPathMessages.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XPathMessages.java
 Wed Aug 12 20:21:43 2009
@@ -87,6 +87,12 @@
                 "The string \"{0}\" is not a valid XPath 2.0 expression: {1}", 
xPathString, message);
     }
 
+    /** The string "{0}" is not a valid XQuery 1.0 expression. */
+    public CompilationMessage errXQuery10Syntax(String xQueryString, String 
message) {
+        return super.formatCompilationMessage(
+                "The string \"{0}\" is not a valid XQuery 1.0 expression: 
{1}", xQueryString, message);
+    }
+    
     /** The XPath node with value "{0}" was not a text node. */
     public CompilationMessage errUnexpectedNodeTypeForXPath(String string) {
         return super.formatCompilationMessage(

Modified: 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java?rev=803698&r1=803697&r2=803698&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java
 Wed Aug 12 20:21:43 2009
@@ -271,6 +271,7 @@
         } catch (XQException xqe) {
             __log.debug(xqe);
             __log.info("Couldn't validate properly expression " + xqueryStr);
+            throw new CompilationException(__msgs.errXQuery10Syntax(xqueryStr, 
"Couldn't validate XQuery expression"));
         } catch (WrappedResolverException wre) {
             if (wre._compilationMsg != null)
                 throw new CompilationException(wre._compilationMsg, wre);


Reply via email to