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