1 23 24 29 42 43 48 49 package com.sun.enterprise.util.pool; 50 51 import java.io.PrintStream ; 52 import java.io.PrintWriter ; 53 54 public class PoolException 55 extends Exception 56 { 57 Throwable throwable = null; 58 59 public PoolException() { 60 super(); 61 } 62 63 public PoolException(String message) { 64 super(message); 65 } 66 67 public PoolException(String message, Throwable throwable) { 68 super(message); 69 this.throwable = throwable; 70 } 71 72 public Throwable getThrowable() { 73 return this.throwable; 74 } 75 76 public void printStackTrace() { 77 printStackTrace(new PrintWriter (System.err)); 78 } 79 80 public void printStackTrace(PrintStream ps) { 81 printStackTrace(new PrintWriter (ps)); 82 } 83 84 public void printStackTrace(PrintWriter pw) { 85 if (throwable != null) { 86 pw.println("PoolException: " + getMessage()); 87 throwable.printStackTrace(pw); 88 } else { 89 super.printStackTrace(pw); 90 } 91 } 92 93 } | Popular Tags |