1 4 package com.tc.object.tx; 5 6 import com.tc.exception.ExceptionWrapper; 7 import com.tc.exception.ExceptionWrapperImpl; 8 9 12 public class UnlockedSharedObjectException extends RuntimeException { 13 14 private static final ExceptionWrapper wrapper = new ExceptionWrapperImpl(); 15 16 private UnlockedSharedObjectException() { 17 super(); 18 } 19 20 private UnlockedSharedObjectException(String message) { 21 super(wrapper.wrap(message)); 22 } 23 24 public UnlockedSharedObjectException(String message, String threadName, long vmId) { 25 this(UnlockedSharedObjectException.createDisplayableString(message, threadName, vmId)); 26 } 27 28 public UnlockedSharedObjectException(String message, String threadName, long vmId, String details) { 29 this(UnlockedSharedObjectException.createDisplayableString(message, threadName, vmId) + "\n " + details); 30 } 31 32 private static String createDisplayableString(String message, String threadName, long vmId) { 33 return message + "\n\n Caused by Thread: " + threadName + " in VM(" + vmId + ")"; 34 } 35 } | Popular Tags |