[Webfunds-commits] java/webfunds/sox SmartIssuer.java SubAccount.java

Ian Grigg iang@cypherpunks.ai
Sun, 16 Jul 2000 15:34:42 -0400 (AST)


iang        00/07/16 15:34:42

  Modified:    webfunds/sox SmartIssuer.java SubAccount.java
  Log:
  more precise exceptions, can tell if the net is up but issuer down

Revision  Changes    Path
1.11      +5 -5      java/webfunds/sox/SmartIssuer.java

Index: SmartIssuer.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/SmartIssuer.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SmartIssuer.java	2000/07/14 23:12:35	1.10
+++ SmartIssuer.java	2000/07/16 19:34:41	1.11
@@ -1,5 +1,5 @@
 /*
- * $Id: SmartIssuer.java,v 1.10 2000/07/14 23:12:35 gelderen Exp $
+ * $Id: SmartIssuer.java,v 1.11 2000/07/16 19:34:41 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -172,7 +172,7 @@
             throw new RuntimeException("failures == laters == 0: no Issuers?");
 
         if (failures == 0)
-            throw new SOXLaterException(SOXLaterException.DOWN,
+            throw new SOXLaterException(SOXLaterException.LATER_DOWN,
                                         "tried them all, but all are down");
 
         else if (laters == 0)
@@ -210,12 +210,12 @@
         if (failures == 0 && laters == 0)
             throw new RuntimeException("failures == laters == 0: no Issuers?");
         if (failures == 0)
-            throw new SOXLaterException(SOXLaterException.DOWN,
+            throw new SOXLaterException(SOXLaterException.LATER_DOWN,
                                         "tried them all, but all are down");
         else if (laters == 0)
             throw new SOXIssuerException("tried them all, all dead.  Fatal?");
         else // mixed results
-            throw new SOXLaterException(SOXLaterException.DOWN,
+            throw new SOXLaterException(SOXLaterException.LATER_DOWN,
                                    "tried them all, " +
                                    laters + " later, " + failures + " failed");
     }
@@ -284,7 +284,7 @@
         if (failures == 0)   // cannot happen?
             throw new RuntimeException("failures == laters == 0: no Issuers?");
 
-        throw new SOXLaterException(SOXLaterException.NET,
+        throw new SOXLaterException(SOXLaterException.LATER_NET,
                         "cannot see net, check your connectivity");
     }
 



1.25      +2 -2      java/webfunds/sox/SubAccount.java

Index: SubAccount.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/SubAccount.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- SubAccount.java	2000/07/14 00:02:31	1.24
+++ SubAccount.java	2000/07/16 19:34:41	1.25
@@ -1,4 +1,4 @@
-/* $Id: SubAccount.java,v 1.24 2000/07/14 00:02:31 iang Exp $
+/* $Id: SubAccount.java,v 1.25 2000/07/16 19:34:41 iang Exp $
  *
  * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * The WebFunds Development Team.  All Rights Reserved.
@@ -395,7 +395,7 @@
         throws SOXLaterException
     {
         if (!NetWatcher.netAvailability())
-            throw new SOXLaterException(SOXLaterException.NET, "No Net");
+            throw new SOXLaterException(SOXLaterException.LATER_NET, "No Net");
     }