1 7 package org.jboss.jms; 8 9 import javax.jms.JMSException ; 10 11 17 public class JBossJMSException 18 extends JMSException  19 { 20 22 24 27 private Throwable cause; 28 29 31 37 public static JMSException handle(Throwable t) 38 { 39 if (t instanceof JMSException ) 40 return (JMSException ) t; 41 return new JBossJMSException("Error",t); 42 } 43 44 46 51 public JBossJMSException(String message) 52 { 53 super(message); 54 } 55 56 63 public JBossJMSException(String message, Throwable cause) 64 { 65 super(message); 66 this.cause = cause; 67 } 68 69 71 73 75 public Throwable getCause() 76 { 77 return cause; 78 } 79 80 82 84 86 } 88 | Popular Tags |