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. --- src/main/java/com/c2kernel/entity/imports/ImportDependency.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/imports/ImportDependency.java') diff --git a/src/main/java/com/c2kernel/entity/imports/ImportDependency.java b/src/main/java/com/c2kernel/entity/imports/ImportDependency.java index 3f528bf..7373bdb 100644 --- a/src/main/java/com/c2kernel/entity/imports/ImportDependency.java +++ b/src/main/java/com/c2kernel/entity/imports/ImportDependency.java @@ -24,8 +24,9 @@ import java.util.ArrayList; import com.c2kernel.collection.Dependency; import com.c2kernel.collection.DependencyDescription; -import com.c2kernel.collection.MembershipException; -import com.c2kernel.common.ObjectNotFoundException; +import com.c2kernel.common.InvalidCollectionModification; +import com.c2kernel.common.ObjectAlreadyExists; +import com.c2kernel.common.ObjectNotFound; import com.c2kernel.lookup.DomainPath; import com.c2kernel.lookup.InvalidItemPathException; import com.c2kernel.lookup.ItemPath; @@ -64,8 +65,9 @@ public class ImportDependency { /** * @return + * @throws ObjectAlreadyExists */ - public com.c2kernel.collection.Dependency create() throws MembershipException, ObjectNotFoundException { + public com.c2kernel.collection.Dependency create() throws InvalidCollectionModification, ObjectNotFound, ObjectAlreadyExists { Dependency newDep = isDescription?new DependencyDescription(name):new Dependency(name); if (version!= null) newDep.setVersion(version); if (itemDescriptionPath != null && itemDescriptionPath.length()>0) { -- cgit v1.2.3