1 28 29 package com.caucho.transaction; 30 31 import javax.transaction.SystemException ; 32 33 public class SystemExceptionWrapper extends SystemException { 34 private Throwable _rootCause; 35 36 public SystemExceptionWrapper(String message) 37 { 38 super(message); 39 } 40 41 public SystemExceptionWrapper(String message, Throwable e) 42 { 43 super(message); 44 45 _rootCause = e; 46 } 47 48 public SystemExceptionWrapper(Throwable e) 49 { 50 super(String.valueOf(e)); 51 52 _rootCause = e; 53 } 54 55 public static SystemExceptionWrapper create(Throwable e) 56 { 57 if (e instanceof SystemExceptionWrapper) 58 return (SystemExceptionWrapper) e; 59 else 60 return new SystemExceptionWrapper(e); 61 } 62 63 public Throwable getCause() 64 { 65 return _rootCause; 66 } 67 } 68 | Popular Tags |