|
From: <pe...@us...> - 2003-12-19 18:03:37
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/cache
In directory sc8-pr-cvs1:/tmp/cvs-serv5310/src/java/org/neuclear/id/cache
Modified Files:
NSCache.java
Log Message:
Revamped a lot of exception handling throughout the framework, it has been simplified in most places:
- For most cases the main exception to worry about now is InvalidNamedObjectException.
- Most lowerlevel exception that cant be handled meaningful are now wrapped in the LowLevelException, a
runtime exception.
- Source and Store patterns each now have their own exceptions that generalizes the various physical
exceptions that can happen in that area.
Index: NSCache.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/cache/NSCache.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** NSCache.java 10 Dec 2003 23:58:51 -0000 1.7
--- NSCache.java 19 Dec 2003 18:03:34 -0000 1.8
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.id.NSTools;
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.InvalidNamedObjectException;
/**
***************
*** 37,45 ****
}
! public void cache(final SignedNamedObject ns) throws NeuClearException {
// Only store if it's parent is already here
! final String parentName = NSTools.getSignatoryURI(ns.getName());
! if ((fetchCached(parentName) != null) || (parentName.equals("neu://"))) {
! spaces.put(ns.getName(), ns);
}
}
--- 38,50 ----
}
! public void cache(final SignedNamedObject ns) {
// Only store if it's parent is already here
! try {
! final String parentName = NSTools.getSignatoryURI(ns.getName());
! if ((fetchCached(parentName) != null) || (parentName.equals("neu://")||NSTools.isHttpScheme(ns.getName())!=null)) {
! spaces.put(ns.getName(), ns);
! }
! } catch (InvalidNamedObjectException e) {
! ;// If we have an issue here we will silently ignore it.
}
}
|