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/persistency/RemoteMap.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/c2kernel/persistency/RemoteMap.java') diff --git a/src/main/java/com/c2kernel/persistency/RemoteMap.java b/src/main/java/com/c2kernel/persistency/RemoteMap.java index c11ceab..b1a1e51 100644 --- a/src/main/java/com/c2kernel/persistency/RemoteMap.java +++ b/src/main/java/com/c2kernel/persistency/RemoteMap.java @@ -27,7 +27,8 @@ import java.util.Iterator; import java.util.Set; import java.util.TreeMap; -import com.c2kernel.common.ObjectNotFoundException; +import com.c2kernel.common.ObjectNotFound; +import com.c2kernel.common.PersistencyException; import com.c2kernel.entity.C2KLocalObject; import com.c2kernel.entity.proxy.ItemProxy; import com.c2kernel.entity.proxy.MemberSubscription; @@ -125,7 +126,7 @@ public class RemoteMap extends TreeMap impl try { keys = storage.getClusterContents(mItemPath, mPath+mName); for (String key : keys) super.put(key, null); - } catch (ClusterStorageException e) { + } catch (PersistencyException e) { Logger.error(e); } @@ -222,9 +223,9 @@ public class RemoteMap extends TreeMap impl super.put(key, value); } return value; - } catch (ClusterStorageException e) { + } catch (PersistencyException e) { Logger.error(e); - } catch (ObjectNotFoundException e) { + } catch (ObjectNotFound e) { Logger.error(e); } } @@ -261,7 +262,7 @@ public class RemoteMap extends TreeMap impl storage.put(mItemPath, value, mLocker); return putLocal(key, value); } - } catch (ClusterStorageException e) { + } catch (PersistencyException e) { Logger.error(e); return null; } @@ -282,7 +283,7 @@ public class RemoteMap extends TreeMap impl storage.remove(mItemPath, mPath+mName+"/"+key, mLocker); return super.remove(key); } - } catch (ClusterStorageException e) { + } catch (PersistencyException e) { Logger.error(e); } return null; -- cgit v1.2.3