|
From: <pe...@us...> - 2003-12-19 18:03:38
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv5310/src/java/org/neuclear/id/verifier
Modified Files:
VerifyingReader.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: VerifyingReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** VerifyingReader.java 16 Dec 2003 15:05:00 -0000 1.16
--- VerifyingReader.java 19 Dec 2003 18:03:34 -0000 1.17
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.xml.XMLException;
import org.neuclear.xml.XMLTools;
+ import org.neuclear.xml.xmlsec.XMLSecurityException;
import java.io.InputStream;
***************
*** 32,35 ****
--- 33,44 ----
$Id$
$Log$
+ Revision 1.17 2003/12/19 18:03:34 pelle
+ 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.
+
Revision 1.16 2003/12/16 15:05:00 pelle
Added SignedMessage contract for signing simple textual contracts.
***************
*** 157,168 ****
* @param is
* @return
! * @throws NeuClearException
*/
! public final SignedNamedObject read(final InputStream is) throws XMLException, NeuClearException {
! final Element elem = XMLTools.loadDocument(is).getRootElement();
! return read(elem);
}
! public final SignedNamedObject read(final Element elem) throws NeuClearException, XMLException {
return resolveReader(elem).read(SignedNamedCore.read(elem), elem);
}
--- 166,181 ----
* @param is
* @return
! * @throws InvalidNamedObjectException
*/
! public final SignedNamedObject read(final InputStream is) throws InvalidNamedObjectException, NameResolutionException {
! try {
! final Element elem = XMLTools.loadDocument(is).getRootElement();
! return read(elem);
! } catch (XMLException e) {
! throw new InvalidNamedObjectException("unknown", e.getLocalizedMessage());
! }
}
! public final SignedNamedObject read(final Element elem) throws InvalidNamedObjectException, NameResolutionException{
return resolveReader(elem).read(SignedNamedCore.read(elem), elem);
}
|