incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jnee...@apache.org
Subject svn commit: r696412 - in /incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements: ./ actions/impl/
Date Wed, 17 Sep 2008 19:40:44 GMT
Author: jneeraj
Date: Wed Sep 17 12:40:43 2008
New Revision: 696412

URL: http://svn.apache.org/viewvc?rev=696412&view=rev
Log:
IMPERIUS-18: catch and rethrow exceptions for consumption by caller part2 - patches by Reza

Modified:
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/ActionBlock.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ArrowActionBlock.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ConcurrentActionBlock.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ExtrinsicMethodInvokeAction.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/InvokePolicyAction.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalAndActionBlock.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalOrActionBlock.java
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/SetActionBlock.java

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/ActionBlock.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/ActionBlock.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/ActionBlock.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/ActionBlock.java
Wed Sep 17 12:40:43 2008
@@ -26,9 +26,10 @@
 
 
 import org.apache.imperius.spl.external.Actuator;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
 
 public interface ActionBlock {
 	
-	boolean execute(Actuator ac);
+	boolean execute(Actuator ac) throws SPLException;
 
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
Wed Sep 17 12:40:43 2008
@@ -143,13 +143,13 @@
 
     }
 
-    public boolean execute(Actuator ac) 
+    public boolean execute(Actuator ac) throws SPLException
     {
         boolean postExprResult = false;
         int i = 0;
         Object intermediateObject = null;
-        try 
-        {
+//        try 
+//        {
             if (!_identTupleList.isEmpty()) 
             {
                 Iterator idIter = _identTupleList.iterator();
@@ -186,9 +186,10 @@
                     } 
                     catch (SPLException e) 
                     {
-                        e.printStackTrace();
+//                        e.printStackTrace();
                         logger.severe(Thread.currentThread().getName() + " "
                                 + e.getMessage());
+                        throw e;
 
                     }
                     String operation = this._operatorType;
@@ -247,11 +248,11 @@
                 //System.out.println("AnchorMethodInvokeAction returning  "+postExprResult);
                 return postExprResult;
             }
-        } 
-        catch (SPLException e) 
-        {
-
-        }
+//        } 
+//        catch (SPLException e) 
+//        {
+//
+//        }
         logger.exiting(sourceClass, Thread.currentThread().getName() + " "
                 + "execute");
         return false;

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ArrowActionBlock.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ArrowActionBlock.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ArrowActionBlock.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ArrowActionBlock.java
Wed Sep 17 12:40:43 2008
@@ -27,6 +27,7 @@
 import java.util.logging.Logger;
 
 import org.apache.imperius.spl.external.Actuator;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.statements.ActionBlock;
 import org.apache.imperius.util.SPLLogger;
 
@@ -51,13 +52,13 @@
     
     // @Override
     /**
-     * If the block is of the form <action block >- ><action block> and the
+     * If the block is of the form <action block> -> <action block> and the
      * first block returns failure, the second block is not evaluated and the
      * whole block returns failure. If the first block succeeds, the second
      * block is evaluated and the whole block returns whatever the second block
      * returns.
      */
-    public boolean execute(Actuator ac)
+    public boolean execute(Actuator ac) throws SPLException
     {
 
         logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "execute");

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ConcurrentActionBlock.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ConcurrentActionBlock.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ConcurrentActionBlock.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ConcurrentActionBlock.java
Wed Sep 17 12:40:43 2008
@@ -28,6 +28,7 @@
 import java.util.logging.Logger;
 
 import org.apache.imperius.spl.external.Actuator;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.statements.ActionBlock;
 import org.apache.imperius.util.SPLLogger;
 
@@ -53,7 +54,7 @@
      * are evaluated concurrently and the whole block succeeds as soon as one of
      * the two internal blocks succeeds.
      */
-    public boolean execute(Actuator ac)
+    public boolean execute(Actuator ac) throws SPLException
     {
         logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "execute");
 

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ExtrinsicMethodInvokeAction.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ExtrinsicMethodInvokeAction.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ExtrinsicMethodInvokeAction.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/ExtrinsicMethodInvokeAction.java
Wed Sep 17 12:40:43 2008
@@ -46,17 +46,17 @@
 		
 	}
 
-	public boolean execute(Actuator ac) 
+	public boolean execute(Actuator ac) throws SPLException
 	{
-		try 
-		{
+//		try 
+//		{
 			_actionExpression.evaluate();
 			return true;
-		} 
-		catch (SPLException e) 
-		{
-		}
-		return false;
+//		} 
+//		catch (SPLException e) 
+//		{
+//		}
+//		return false;
 	}
 
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/InvokePolicyAction.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/InvokePolicyAction.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/InvokePolicyAction.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/InvokePolicyAction.java
Wed Sep 17 12:40:43 2008
@@ -68,7 +68,7 @@
 
 	}
 
-	public boolean execute(Actuator ac) 
+	public boolean execute(Actuator ac) throws SPLException
 	{
 		logger.entering(sourceClass, Thread.currentThread().getName() + " "
 				+ "execute");
@@ -77,8 +77,8 @@
 		Expression _rhsExp = null;
 		TypeInfo lType = null;
 
-		try 
-		{
+//		try 
+//		{
 			InternalClient internalClientObj = null;
 			// System.out.println("parameters List " + _paramList);
 			if (_paramList.size() == 0) 
@@ -155,12 +155,12 @@
 			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
 					+ "execute");
 			return true;
-		} catch (SPLException e) {
-			logger.severe(e.getMessage());
-			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
-					+ "execute");
-			return false;
-		}
+//		} catch (SPLException e) {
+//			logger.severe(e.getMessage());
+//			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+//					+ "execute");
+//			return false;
+//		}
 	}
 
 	public String getClassName() {

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalAndActionBlock.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalAndActionBlock.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalAndActionBlock.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalAndActionBlock.java
Wed Sep 17 12:40:43 2008
@@ -28,6 +28,7 @@
 import java.util.logging.Logger;
 
 import org.apache.imperius.spl.external.Actuator;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.statements.ActionBlock;
 import org.apache.imperius.util.SPLLogger;
 
@@ -55,7 +56,7 @@
      * may be evaluated concurrently and the whole block succeeds if both
      * internal blocks return success.
      */
-    public boolean execute(Actuator ac)
+    public boolean execute(Actuator ac) throws SPLException
     {
         logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "execute");
 

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalOrActionBlock.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalOrActionBlock.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalOrActionBlock.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/LogicalOrActionBlock.java
Wed Sep 17 12:40:43 2008
@@ -27,6 +27,7 @@
 import java.util.logging.Logger;
 
 import org.apache.imperius.spl.external.Actuator;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.statements.ActionBlock;
 import org.apache.imperius.util.SPLLogger;
 
@@ -57,7 +58,7 @@
      * is evaluated and the whole block returns whatever the second block
      * returns.
      */
-    public boolean execute(Actuator ac)
+    public boolean execute(Actuator ac) throws SPLException
     {
         logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "execute");
 

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/SetActionBlock.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/SetActionBlock.java?rev=696412&r1=696411&r2=696412&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/SetActionBlock.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/SetActionBlock.java
Wed Sep 17 12:40:43 2008
@@ -70,15 +70,15 @@
 				+ "SetActionBlock");
     }
     
-    public boolean execute(Actuator ac)
+    public boolean execute(Actuator ac) throws SPLException
     {
         logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "execute");
 
        //System.out.println("Executing set action  on "+this.getClassName());
         HashMap modifiedProperties = new HashMap();
         String instanceName = _className;
-        try
-        {
+//        try
+//        {
            //System.out.println("size of parameters in set action block :"+ this._paramList.size());
             for (int i = 0; i < _paramList.size(); i++)
             {
@@ -134,15 +134,15 @@
 					+ "execute");
             
             return true;
-        }
-        catch (SPLException e)
-        {
-            logger.severe(e.getMessage());
-
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "execute");
-     
-            return false;
-        }
+//        }
+//        catch (SPLException e)
+//        {
+//            logger.severe(e.getMessage());
+//
+//            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "execute");
+//     
+//            return false;
+//        }
     }
     
     public String getClassName()



Mime
View raw message