[Webfunds-commits] java/webfunds/client/sox PaymentException.java CancelException.java WalletException.java

Ian Grigg iang@cypherpunks.ai
Sun, 17 Sep 2000 15:42:25 -0400 (AST)


iang        00/09/17 15:42:25

  Modified:    webfunds/client/sox CancelException.java
                        WalletException.java
  Added:       webfunds/client/sox PaymentException.java
  Log:
  more numbers, added PaymentEx for Teller

Revision  Changes    Path
1.3       +2 -2      java/webfunds/client/sox/CancelException.java

Index: CancelException.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/CancelException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CancelException.java	2000/07/16 19:24:01	1.2
+++ CancelException.java	2000/09/17 19:42:24	1.3
@@ -1,5 +1,5 @@
 /*
- * $Id: CancelException.java,v 1.2 2000/07/16 19:24:01 iang Exp $
+ * $Id: CancelException.java,v 1.3 2000/09/17 19:42:24 iang Exp $
  *
  * Copyright (c) 2000 Systemics Inc on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -8,7 +8,7 @@
 
 /**
  *  This exception class is thrown when a cancel call fails.
- *  For hich-level but non-GUI wallet calls.
+ *  For high-level but non-GUI wallet calls.
  */
 public class CancelException
     extends WalletException



1.4       +10 -3     java/webfunds/client/sox/WalletException.java

Index: WalletException.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/WalletException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WalletException.java	2000/09/04 19:24:59	1.3
+++ WalletException.java	2000/09/17 19:42:24	1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: WalletException.java,v 1.3 2000/09/04 19:24:59 iang Exp $
+ * $Id: WalletException.java,v 1.4 2000/09/17 19:42:24 iang Exp $
  *
  * Copyright (c) 2000 Systemics Inc on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -34,7 +34,8 @@
 			    UNKNOWN_AC     = 105, // cannot access
 			    UNKNOWN_SUB    = 106, // cannot access
 			    NOT_VALUE      = 107, // not a ValueAccount
-                            NOT_ENUF_FUNDS = 108, // never thrown?
+                            NOT_ENUF_FUNDS = 108, // asking for too much!
+                            PID_IN_USE     = 109, // requested pid already used
 
                             LAST_WALLET_ERRNO = 108;
 
@@ -42,7 +43,6 @@
      *  Use these rather than worry about which number...
      */
     public boolean isUnknownAccount() { return getNumber() == UNKNOWN_AC; }
-    public boolean isAlready()  { return getNumber() == ALREADY ; }
     public boolean isTooLate()  { return getNumber() == TOO_LATE ; }
 
     public boolean isFailed()   { return getNumber() != ALREADY ; }
@@ -58,6 +58,13 @@
         return (number == Errors.ERROR_LATER) ||       // server reports
                (number == SOXException.LATER_NET) ||   // server timeout
                (number == SOXException.LATER_DOWN);    // no net
+    }
+
+    public boolean isAlready()
+    {
+        return (number == ALREADY)            ||
+               (number == Errors.ERROR_DEP_ALREADY) ||   // did is used
+               (number == Errors.ERROR_ALREADY);         // pid is used
     }
 
 



1.1                  java/webfunds/client/sox/PaymentException.java

Index: PaymentException.java
===================================================================
/*
 * $Id: PaymentException.java,v 1.1 2000/09/17 19:42:24 iang Exp $
 *
 * Copyright (c) 2000 Systemics Inc on behalf of
 * the WebFunds Development Team.  All Rights Reserved.
 */
package webfunds.client.sox;

/**
 *  This exception class is thrown when a request for a payment fails.
 *  For high-level but non-GUI wallet calls.
 */
public class PaymentException
    extends WalletException
{

    public PaymentException(String msg)               { super(msg); }
    public PaymentException(int errno)                { super(errno); }
    public PaymentException(int errno, String msg)    { super(errno, msg); }

    public String toString() { return "PayEx: " + super.getMessage(); }
}