From 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 3 Oct 2014 17:30:41 +0200 Subject: 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. --- .../java/com/c2kernel/entity/TraceableEntity.java | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/TraceableEntity.java') diff --git a/src/main/java/com/c2kernel/entity/TraceableEntity.java b/src/main/java/com/c2kernel/entity/TraceableEntity.java index 3c7a317..18bb987 100644 --- a/src/main/java/com/c2kernel/entity/TraceableEntity.java +++ b/src/main/java/com/c2kernel/entity/TraceableEntity.java @@ -22,10 +22,11 @@ package com.c2kernel.entity; import com.c2kernel.common.AccessRightsException; -import com.c2kernel.common.InvalidDataException; -import com.c2kernel.common.InvalidTransitionException; -import com.c2kernel.common.ObjectAlreadyExistsException; -import com.c2kernel.common.ObjectNotFoundException; +import com.c2kernel.common.InvalidCollectionModification; +import com.c2kernel.common.InvalidData; +import com.c2kernel.common.InvalidTransition; +import com.c2kernel.common.ObjectAlreadyExists; +import com.c2kernel.common.ObjectNotFound; import com.c2kernel.common.PersistencyException; import com.c2kernel.common.SystemKey; import com.c2kernel.lookup.ItemPath; @@ -109,7 +110,7 @@ public class TraceableEntity extends ItemPOA String initCollsString ) throws AccessRightsException, - InvalidDataException, + InvalidData, PersistencyException { synchronized (this) { @@ -117,7 +118,8 @@ public class TraceableEntity extends ItemPOA } } - /************************************************************************** + /** + * @throws InvalidCollectionModification * **************************************************************************/ //requestdata is xmlstring @@ -128,11 +130,11 @@ public class TraceableEntity extends ItemPOA String requestData ) throws AccessRightsException, - InvalidTransitionException, - ObjectNotFoundException, - InvalidDataException, + InvalidTransition, + ObjectNotFound, + InvalidData, PersistencyException, - ObjectAlreadyExistsException + ObjectAlreadyExists, InvalidCollectionModification { synchronized (this) { return mItemImpl.requestAction(agentId, stepPath, transitionID, requestData); @@ -147,7 +149,7 @@ public class TraceableEntity extends ItemPOA boolean filter ) throws AccessRightsException, - ObjectNotFoundException, + ObjectNotFound, PersistencyException { synchronized (this) { @@ -164,12 +166,12 @@ public class TraceableEntity extends ItemPOA * @return The result string in xml format * except 'all' which returns a comma sep list * - * @exception ObjectNotFoundException + * @exception ObjectNotFound * ************************************************************************/ @Override public String queryData(String path) throws AccessRightsException, - ObjectNotFoundException, + ObjectNotFound, PersistencyException { synchronized (this) { -- cgit v1.2.3