1 21 22 package org.apache.derby.client.am; 23 24 25 public class XaException extends javax.transaction.xa.XAException implements Diagnosable { 26 java.lang.Throwable throwable_ = null; 27 28 30 public XaException(LogWriter logWriter) { 31 super(); 32 if (logWriter != null) { 33 logWriter.traceDiagnosable(this); 34 } 35 } 36 37 public XaException(LogWriter logWriter, java.lang.Throwable throwable) { 38 super(); 39 throwable_ = throwable; 40 if (((org.apache.derby.client.am.Configuration.jreLevelMajor == 1) && 41 (org.apache.derby.client.am.Configuration.jreLevelMinor >= 4)) || 42 (org.apache.derby.client.am.Configuration.jreLevelMajor > 1)) { initCause(throwable); 44 } 45 if (logWriter != null) { 46 logWriter.traceDiagnosable(this); 47 } 48 } 49 50 public XaException(LogWriter logWriter, int errcode) { 51 super(); 52 errorCode = errcode; 53 if (logWriter != null) { 54 logWriter.traceDiagnosable(this); 55 } 56 } 57 58 public XaException(LogWriter logWriter, java.lang.Throwable throwable, int errcode) { 59 super(); 60 errorCode = errcode; 61 throwable_ = throwable; 62 if (((org.apache.derby.client.am.Configuration.jreLevelMajor == 1) && 63 (org.apache.derby.client.am.Configuration.jreLevelMinor >= 4)) || 64 (org.apache.derby.client.am.Configuration.jreLevelMajor > 1)) { initCause(throwable); 66 } 67 if (logWriter != null) { 68 logWriter.traceDiagnosable(this); 69 } 70 } 71 72 public XaException(LogWriter logWriter, String s) { 73 super(s); 74 if (logWriter != null) { 75 logWriter.traceDiagnosable(this); 76 } 77 } 78 79 public XaException(LogWriter logWriter, java.lang.Throwable throwable, String s) { 80 super(s); 81 throwable_ = throwable; 82 if (((org.apache.derby.client.am.Configuration.jreLevelMajor == 1) && 83 (org.apache.derby.client.am.Configuration.jreLevelMinor >= 4)) || 84 (org.apache.derby.client.am.Configuration.jreLevelMajor > 1)) { initCause(throwable); 86 } 87 if (logWriter != null) { 88 logWriter.traceDiagnosable(this); 89 } 90 } 91 92 public Sqlca getSqlca() { 93 return null; 94 } 95 96 public java.lang.Throwable getThrowable() { 97 return throwable_; 98 } 99 100 public void printTrace(java.io.PrintWriter printWriter, String header) { 101 ExceptionFormatter.printTrace(this, printWriter, header); 102 } 103 104 XaException copyAsUnchainedXAException(LogWriter logWriter) { 108 XaException xae = new XaException(logWriter, this.getThrowable(), getMessage()); xae.errorCode = this.errorCode; 110 return xae; 111 } 112 } 113 114 115 116 | Popular Tags |