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