[Webfunds-commits] java/webfunds/sox Payment.java

Ian Grigg iang@cypherpunks.ai
Sun, 4 Jun 2000 20:54:30 -0400 (AST)


iang        00/06/04 20:54:30

  Modified:    webfunds/sox Payment.java
  Log:
  Eliminate some IOExs

Revision  Changes    Path
1.18      +12 -4     java/webfunds/sox/Payment.java

Index: Payment.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Payment.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Payment.java	2000/05/28 02:59:56	1.17
+++ Payment.java	2000/06/05 00:54:30	1.18
@@ -1,5 +1,5 @@
 /*
- * $Id: Payment.java,v 1.17 2000/05/28 02:59:56 iang Exp $
+ * $Id: Payment.java,v 1.18 2000/06/05 00:54:30 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -206,7 +206,11 @@
     public Payment(byte[] paymentData)
         throws SOXPacketException
     {
-        decode(paymentData);
+//        try {
+            decode(paymentData);
+//        } catch (IOException ex) {   // compiler doesn't insist, but thrown!
+//            throw new SOXPacketException("IOEx: " + ex);
+//        }
     }
 
     /**
@@ -222,9 +226,13 @@
      * @excep SOXPacketException The payment data is badly formatted
      */
     public Payment(InputStream is)
-        throws IOException, SOXPacketException
+        throws SOXPacketException
     {
-        decode(is);
+        try {
+            decode(is);
+        } catch (IOException ex) {   // compiler doesn't insist, but thrown!
+            throw new SOXPacketException("IOEx: " + ex);
+        }
     }
 
     /**