1 22 package org.jboss.tm; 23 24 import java.io.PrintStream ; 25 import java.io.PrintWriter ; 26 import java.io.Serializable ; 27 import javax.transaction.RollbackException ; 28 import javax.transaction.TransactionRolledbackException ; 29 import org.jboss.util.NestedThrowable; 30 31 32 33 42 43 public class JBossTransactionRolledbackException 44 extends TransactionRolledbackException 45 implements NestedThrowable, Serializable 46 { 47 48 public JBossTransactionRolledbackException() 49 { 50 super(); 51 } 52 53 public JBossTransactionRolledbackException(final String message) 54 { 55 super(message); 56 } 57 58 59 public JBossTransactionRolledbackException(final Throwable t) 60 { 61 super(); 62 this.detail = t; 63 } 64 65 public JBossTransactionRolledbackException(final String message, final Throwable t) 66 { 67 super(message); 68 this.detail = t; 69 } 70 71 72 74 public Throwable getNested() 75 { 76 return detail; 77 } 78 79 public Throwable getCause() 80 { 81 return detail; 82 } 83 84 89 public String getMessage() 90 { 91 return NestedThrowable.Util.getMessage(super.getMessage(), detail); 92 } 93 94 100 public void printStackTrace(final PrintStream stream) 101 { 102 if (detail == null || NestedThrowable.PARENT_TRACE_ENABLED) 103 { 104 super.printStackTrace(stream); 105 } 106 NestedThrowable.Util.print(detail, stream); 107 } 108 109 115 public void printStackTrace(final PrintWriter writer) 116 { 117 if (detail == null || NestedThrowable.PARENT_TRACE_ENABLED) 118 { 119 super.printStackTrace(writer); 120 } 121 NestedThrowable.Util.print(detail, writer); 122 } 123 124 128 public void printStackTrace() 129 { 130 printStackTrace(System.err); 131 } 132 133 } | Popular Tags |