Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core
In directory sc8-pr-cvs1:/tmp/cvs-serv8082/src/org/beepcore/beep/core
Modified Files:
BEEPException.java SessionImpl.java
Log Message:
Added exception chaining for exceptions that were being remapped
Index: BEEPException.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/BEEPException.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** BEEPException.java 7 Sep 2002 15:15:49 -0000 1.5
--- BEEPException.java 7 Nov 2003 23:01:12 -0000 1.6
***************
*** 2,6 ****
* BEEPException.java $Revision$ $Date$
*
! * Copyright (c) 2001,2002 Huston Franklin. All rights reserved.
*
* The contents of this file are subject to the Blocks Public License (the
--- 2,6 ----
* BEEPException.java $Revision$ $Date$
*
! * Copyright (c) 2001-2003 Huston Franklin. All rights reserved.
*
* The contents of this file are subject to the Blocks Public License (the
***************
*** 52,55 ****
--- 52,70 ----
public BEEPException(Throwable cause) {
super(cause == null ? null : cause.toString());
+ this.cause = cause;
+ }
+
+ /**
+ * Constructs a new <code>BEEPException</code> with the specified
+ * cause and detailed message.
+ *
+ * @param message the detailed message which is saved for later
+ * retrieval by the <code>getMessage()</code> method.
+ *
+ * @param cause the cause which is saved for later retrieval by
+ * the <code>getCause()</code> method.
+ */
+ public BEEPException(String message, Throwable cause) {
+ super(message);
this.cause = cause;
}
Index: SessionImpl.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/SessionImpl.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** SessionImpl.java 7 Nov 2003 17:39:21 -0000 1.10
--- SessionImpl.java 7 Nov 2003 23:01:12 -0000 1.11
***************
*** 1699,1703 ****
}
} catch (Exception x) {
! throw new BEEPException(x.getMessage());
}
} else {
--- 1699,1703 ----
}
} catch (Exception x) {
! throw new BEEPException(x);
}
} else {
|