|
From: <pe...@us...> - 2003-12-19 18:03:38
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv5310/src/java/org/neuclear/signers/servlet
Modified Files:
SigningServlet.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: SigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/SigningServlet.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** SigningServlet.java 19 Dec 2003 00:31:31 -0000 1.26
--- SigningServlet.java 19 Dec 2003 18:03:35 -0000 1.27
***************
*** 2,5 ****
--- 2,13 ----
* $Id$
* $Log$
+ * Revision 1.27 2003/12/19 18:03:35 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.26 2003/12/19 00:31:31 pelle
* Lots of usability changes through out all the passphrase agents and end user tools.
***************
*** 391,406 ****
private boolean sign(final NamedObjectBuilder named, final PrintWriter out) throws NeuClearException, XMLException {
boolean isSigned;
! try {
! context.log("SIGN: Signing with " + named.getSignatory().getName());
! final SignedNamedObject signed = named.sign(signer);
! isSigned = true;
! out.println("<li>Signed</li>");
! out.println("<li>" + signed.getName() + " Verified</li>");
! out.flush();
! } catch (InvalidPassphraseException e) {
! out.println("<li><font color=\"red\"><b>ERROR: Wrong Passphrase</b></font></li>");
! out.flush();
! isSigned = sign(named,out);
! }
return isSigned;
}
--- 399,413 ----
private boolean sign(final NamedObjectBuilder named, final PrintWriter out) throws NeuClearException, XMLException {
boolean isSigned;
! context.log("SIGN: Signing with " + named.getSignatory().getName());
! final SignedNamedObject signed = named.sign(signer);
! isSigned = true;
! out.println("<li>Signed</li>");
! out.println("<li>" + signed.getName() + " Verified</li>");
! out.flush();
! // } catch (InvalidPassphraseException e) {
! // out.println("<li><font color=\"red\"><b>ERROR: Wrong Passphrase</b></font></li>");
! // out.flush();
! // isSigned = sign(named,out);
! // }
return isSigned;
}
|