[Webfunds-commits] java/webfunds/sox/value WalletException.java

Ian Grigg iang@cypherpunks.ai
Thu, 12 Apr 2001 00:53:38 -0400 (AST)


iang        01/04/12 00:53:38

  Modified:    webfunds/sox/value WalletException.java
  Log:
  Now uses standard ExceptionModel, so all code knows to expect/use a
  SOX error number.

Revision  Changes    Path
1.9       +10 -8     java/webfunds/sox/value/WalletException.java

Index: WalletException.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/value/WalletException.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- WalletException.java	2001/03/24 23:57:24	1.8
+++ WalletException.java	2001/04/12 04:53:37	1.9
@@ -1,11 +1,13 @@
 /*
- * $Id: WalletException.java,v 1.8 2001/03/24 23:57:24 iang Exp $
+ * $Id: WalletException.java,v 1.9 2001/04/12 04:53:37 iang Exp $
  *
  * Copyright (c) 2000 Systemics Inc on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
  */
 package webfunds.sox.value;
 
+import webfunds.util.ExceptionModel;
+
 import webfunds.sox.Errors;
 import webfunds.sox.SOXException;
 
@@ -14,10 +16,10 @@
  *  internal SOX Wallet Exceptions.
  */
 public class WalletException
-    extends Exception
+    extends ExceptionModel
 {
-    private int             number;
-    public int              getNumber()         { return number; }
+    // private int             number;
+    // public int              getNumber()         { return number; }
 
     /**
      *  These high-level wallet errors are positive and greater than 99,
@@ -72,9 +74,9 @@
     public boolean isClosed()   { return getNumber() == CLOSED ; }
 
 
-    public WalletException(String msg)          { super(msg); number = 0; }
-    public WalletException(int num)             { super("" ); number = num; }
-    public WalletException(int num, String msg) { super(msg); number = num; }
+    public WalletException(String msg)          { super(UNKNOWN, msg); }
+    public WalletException(int num)             { super(num, "");      }
+    public WalletException(int num, String msg) { super(num, msg);     }
 
-    public String toString() { return "("+number+") " + super.getMessage(); }
+    // public String toString() { return "("+number+") " + super.getMessage(); }
 }