diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
| commit | 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 (patch) | |
| tree | ddcc6b14077d90d1b970b67829f07120547dbb62 /src/main/java/com/c2kernel/lifecycle/instance/XOrSplit.java | |
| parent | a139f95bfeca603333b8c0310ae09c6805e58584 (diff) | |
Huge exception overhaul: Merged ClusterStorageException with
PersistencyException. Replaced MembershipException with
InvalidCollectionModification CORBA Exception. Made all predef steps
throw more accurate exceptions when they go wrong, and let more
exceptions bubble through from underneath.
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/XOrSplit.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/XOrSplit.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/XOrSplit.java b/src/main/java/com/c2kernel/lifecycle/instance/XOrSplit.java index 28896af..e5b91d3 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/XOrSplit.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/XOrSplit.java @@ -23,11 +23,7 @@ package com.c2kernel.lifecycle.instance; import java.util.ArrayList;
import java.util.StringTokenizer;
-import com.c2kernel.common.AccessRightsException;
-import com.c2kernel.common.InvalidDataException;
-import com.c2kernel.common.InvalidTransitionException;
-import com.c2kernel.common.ObjectNotFoundException;
-import com.c2kernel.common.PersistencyException;
+import com.c2kernel.common.InvalidData;
import com.c2kernel.graph.model.DirectedEdge;
import com.c2kernel.lookup.AgentPath;
import com.c2kernel.lookup.ItemPath;
@@ -49,7 +45,7 @@ public class XOrSplit extends Split }
@Override
- public void runNext(AgentPath agent, ItemPath itemPath) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException
+ public void runNext(AgentPath agent, ItemPath itemPath) throws InvalidData
{
ArrayList<DirectedEdge> nextsToFollow = new ArrayList<DirectedEdge>();
String nexts;
@@ -59,7 +55,7 @@ public class XOrSplit extends Split nexts = this.evaluateScript(scriptName, scriptVersion, itemPath).toString();
} catch (ScriptingEngineException e) {
Logger.error(e);
- throw new InvalidDataException("Error running routing script "+scriptName+" v"+scriptVersion, "");
+ throw new InvalidData("Error running routing script "+scriptName+" v"+scriptVersion);
}
StringTokenizer tok = new StringTokenizer(nexts,",");
@@ -74,13 +70,13 @@ public class XOrSplit extends Split }
// Logger.debug(0, getID()+" following "+nexts);
if (nextsToFollow.size() != 1)
- throw new InvalidDataException("not good number of active next", null);
+ throw new InvalidData("not good number of active next");
followNext((Next)nextsToFollow.get(0), agent, itemPath);
}
- public void followNext(Next activeNext, AgentPath agent, ItemPath itemPath) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException {
+ public void followNext(Next activeNext, AgentPath agent, ItemPath itemPath) throws InvalidData {
activeNext.getTerminusVertex().run(agent, itemPath);
}
|
