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/lookup/AgentPath.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/c2kernel/lookup/AgentPath.java') diff --git a/src/main/java/com/c2kernel/lookup/AgentPath.java b/src/main/java/com/c2kernel/lookup/AgentPath.java index d2a6c7f..06be6d4 100644 --- a/src/main/java/com/c2kernel/lookup/AgentPath.java +++ b/src/main/java/com/c2kernel/lookup/AgentPath.java @@ -26,7 +26,7 @@ import java.util.UUID; import org.apache.xerces.impl.dv.util.Base64; -import com.c2kernel.common.ObjectNotFoundException; +import com.c2kernel.common.ObjectNotFound; import com.c2kernel.common.SystemKey; import com.c2kernel.process.Gateway; @@ -47,7 +47,7 @@ public class AgentPath extends ItemPath super(syskey); try { findAgentName(); - } catch (ObjectNotFoundException e) { + } catch (ObjectNotFound e) { throw new InvalidAgentPathException(); } } @@ -55,7 +55,7 @@ public class AgentPath extends ItemPath super(uuid); try { findAgentName(); - } catch (ObjectNotFoundException e) { + } catch (ObjectNotFound e) { throw new InvalidAgentPathException(); } } @@ -64,7 +64,7 @@ public class AgentPath extends ItemPath super(itemPath.mUUID); try { findAgentName(); - } catch (ObjectNotFoundException e) { + } catch (ObjectNotFound e) { throw new InvalidAgentPathException(); } } @@ -78,7 +78,7 @@ public class AgentPath extends ItemPath super(path); try { findAgentName(); - } catch (ObjectNotFoundException e) { + } catch (ObjectNotFound e) { throw new InvalidAgentPathException(); } } @@ -93,13 +93,13 @@ public class AgentPath extends ItemPath if (mAgentName==null) try { findAgentName(); - } catch (ObjectNotFoundException e) { + } catch (ObjectNotFound e) { return null; } return mAgentName; } - private void findAgentName() throws ObjectNotFoundException { + private void findAgentName() throws ObjectNotFound { mAgentName = Gateway.getLookup().getAgentName(this); } @@ -115,7 +115,7 @@ public class AgentPath extends ItemPath public boolean hasRole(String role) { try { return hasRole(Gateway.getLookup().getRolePath(role)); - } catch (ObjectNotFoundException ex) { + } catch (ObjectNotFound ex) { return false; } } -- cgit v1.2.3