1 24 25 package org.objectweb.jtests.jms.framework; 26 27 import junit.framework.*; 28 import javax.jms.JMSException ; 29 30 40 public class JMSTestCase extends TestCase { 41 42 49 public void fail (Exception e) { 50 if (e instanceof javax.jms.JMSException ) { 51 JMSException exception = (JMSException ) e; 52 String message = e.toString(); 53 Exception linkedException = exception.getLinkedException(); 54 if (linkedException != null) { 55 message += " [linked exception: "+ linkedException +"]"; 56 } 57 super.fail(message); 58 } else { 59 super.fail(e.getMessage()); 60 } 61 } 62 63 public JMSTestCase(String name) { 64 super(name); 65 } 66 } 67 68 69 | Popular Tags |