[Webfunds-commits] java/webfunds/client/sox WalletException.java
Ian Grigg
iang@cypherpunks.ai
Mon, 4 Sep 2000 15:24:59 -0400 (AST)
iang 00/09/04 15:24:59
Modified: webfunds/sox SOXException.java
webfunds/client/sox WalletException.java
Log:
make LATER available to DepositEx
Revision Changes Path
1.5 +12 -1 java/webfunds/sox/SOXException.java
Index: SOXException.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/SOXException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SOXException.java 2000/07/16 19:23:35 1.4
+++ SOXException.java 2000/09/04 19:24:59 1.5
@@ -1,5 +1,5 @@
/*
- * $Id: SOXException.java,v 1.4 2000/07/16 19:23:35 iang Exp $
+ * $Id: SOXException.java,v 1.5 2000/09/04 19:24:59 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -50,6 +50,17 @@
isLaterNet() || isLaterDown();
}
+ /**
+ * Is this in our recognised block?
+ * Not a complete test, there are some gaps.
+ */
+ public static final boolean isSOXException(int errno)
+ {
+ if ( (LAST_ERROR <= errno) && (errno < -1) )
+ return true ;
+
+ return false ;
+ }
/**
* getNumber() will return 0
1.3 +9 -1 java/webfunds/client/sox/WalletException.java
Index: WalletException.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/WalletException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WalletException.java 2000/07/16 19:24:01 1.2
+++ WalletException.java 2000/09/04 19:24:59 1.3
@@ -1,5 +1,5 @@
/*
- * $Id: WalletException.java,v 1.2 2000/07/16 19:24:01 iang Exp $
+ * $Id: WalletException.java,v 1.3 2000/09/04 19:24:59 iang Exp $
*
* Copyright (c) 2000 Systemics Inc on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -7,6 +7,7 @@
package webfunds.client.sox;
import webfunds.sox.Errors;
+import webfunds.sox.SOXException;
/**
* This exception base class is inherited by all
@@ -50,6 +51,13 @@
{
return (number == Errors.ERROR_NO_FUNDS) ||
(number == NOT_ENUF_FUNDS);
+ }
+
+ public boolean isLater()
+ {
+ return (number == Errors.ERROR_LATER) || // server reports
+ (number == SOXException.LATER_NET) || // server timeout
+ (number == SOXException.LATER_DOWN); // no net
}