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/persistency/outcome/Viewpoint.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/persistency/outcome/Viewpoint.java')
| -rw-r--r-- | src/main/java/com/c2kernel/persistency/outcome/Viewpoint.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/persistency/outcome/Viewpoint.java b/src/main/java/com/c2kernel/persistency/outcome/Viewpoint.java index 2a5118f..151bf65 100644 --- a/src/main/java/com/c2kernel/persistency/outcome/Viewpoint.java +++ b/src/main/java/com/c2kernel/persistency/outcome/Viewpoint.java @@ -20,14 +20,14 @@ */
package com.c2kernel.persistency.outcome;
-import com.c2kernel.common.InvalidDataException;
-import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.common.InvalidData;
+import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.PersistencyException;
import com.c2kernel.entity.C2KLocalObject;
import com.c2kernel.events.Event;
import com.c2kernel.lookup.InvalidItemPathException;
import com.c2kernel.lookup.ItemPath;
import com.c2kernel.persistency.ClusterStorage;
-import com.c2kernel.persistency.ClusterStorageException;
import com.c2kernel.process.Gateway;
/**
@@ -70,8 +70,8 @@ public class Viewpoint implements C2KLocalObject { this.eventId = eventId;
}
- public Outcome getOutcome() throws ObjectNotFoundException, ClusterStorageException {
- if (eventId == NONE) throw new ObjectNotFoundException("No last eventId defined", "");
+ public Outcome getOutcome() throws ObjectNotFound, PersistencyException {
+ if (eventId == NONE) throw new ObjectNotFound("No last eventId defined");
Outcome retVal = (Outcome)Gateway.getStorage().get(itemPath, ClusterStorage.OUTCOME+"/"+schemaName+"/"+schemaVersion+"/"+eventId, null);
return retVal;
}
@@ -194,10 +194,10 @@ public class Viewpoint implements C2KLocalObject { * @return GDataRecord
*/
public Event getEvent()
- throws InvalidDataException, ClusterStorageException, ObjectNotFoundException
+ throws InvalidData, PersistencyException, ObjectNotFound
{
if (eventId == NONE)
- throw new InvalidDataException("No last eventId defined", "");
+ throw new InvalidData("No last eventId defined");
return (Event)Gateway.getStorage().get(itemPath, ClusterStorage.HISTORY+"/"+eventId, null);
}
|
