You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2003/09/14 02:10:54 UTC

cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp SQLNestedException.java

dirkv       2003/09/13 17:10:54

  Modified:    dbcp/src/java/org/apache/commons/dbcp
                        SQLNestedException.java
  Log:
  improve the printStacktrace methods
  
  Revision  Changes    Path
  1.4       +7 -7      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/SQLNestedException.java
  
  Index: SQLNestedException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/SQLNestedException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SQLNestedException.java	22 Aug 2003 16:08:31 -0000	1.3
  +++ SQLNestedException.java	14 Sep 2003 00:10:54 -0000	1.4
  @@ -101,16 +101,16 @@
       public String getLocalizedMessage() {
           return super.getLocalizedMessage() + ", cause: " + this.cause.getLocalizedMessage();
       }
  -    public String getMessage() {
  -        return super.getMessage() + ", cause: " + this.cause.getMessage();
  -    }
       public void printStackTrace() {
  +        System.err.println(getClass().getName() + ": " + getMessage() + ", cause: ");
           this.cause.printStackTrace();
       }
       public void printStackTrace(PrintStream s) {
  +        s.println(getClass().getName() + ": " + getMessage() + ", cause: ");
           this.cause.printStackTrace(s);
       }
       public void printStackTrace(PrintWriter s) {
  +        s.println(getClass().getName() + ": " + getMessage() + ", cause: ");
           this.cause.printStackTrace(s);
       }
   }