1 23 31 package com.sun.enterprise.resource; 32 33 import java.io.PrintWriter ; 34 import java.io.PrintStream ; 35 36 public class PoolingException extends Exception { 37 38 private Exception ex; 39 40 public PoolingException() { 41 } 42 43 public PoolingException(String s) { 44 super(s); 45 } 46 47 public PoolingException(Exception ex) { 48 super(ex.getMessage()); 49 this.ex = ex; 50 } 51 52 public PoolingException(String s, Exception ex) { 53 super(s); 54 this.ex = ex; 55 } 56 57 public Exception getNestedException() { 58 return ex; 59 } 60 61 public void printStackTrace() { 62 super.printStackTrace(); 63 if (ex != null) { 64 ex.printStackTrace(); 65 } 66 } 67 68 public void printStackTrace(PrintStream ps) { 69 super.printStackTrace(ps); 70 if (ex != null) { 71 ex.printStackTrace(ps); 72 } 73 } 74 75 public void printStackTrace(PrintWriter pw) { 76 super.printStackTrace(pw); 77 if (ex != null) { 78 ex.printStackTrace(pw); 79 } 80 } 81 82 } 83 | Popular Tags |