1 21 22 package org.apache.derbyTesting.unitTests.services; 23 24 import org.apache.derby.iapi.error.StandardException; 25 26 import java.text.MessageFormat ; 27 33 public class T_StandardException extends StandardException 34 { 35 String msgText = "Message text not set"; 36 37 protected T_StandardException(String messageID, String msgText) 38 { 39 super(messageID); 40 myConstructorCommon( messageID, msgText ); 41 } 42 protected T_StandardException(String messageID, String msgText, Throwable t) 43 { 44 super(messageID, t, (Object []) null); 45 myConstructorCommon( messageID, msgText ); 46 } 47 protected T_StandardException(String messageID, String msgText, Throwable t, Object [] args) 48 { 49 super(messageID, t, args); 50 myConstructorCommon( messageID, msgText ); 51 } 52 53 protected void myConstructorCommon( String messageID, String msgText ) 54 { 55 this.msgText = msgText; 56 } 57 58 public static 59 StandardException newT_StandardException(String messageID, Throwable t, String msgText) 60 { 61 return new T_StandardException(messageID,msgText,t); 62 } 63 64 public static 65 StandardException newT_StandardException(String messageID, String msgText) 66 { 67 return new T_StandardException(messageID,msgText); 68 } 69 70 public String getMessage() {return MessageFormat.format(msgText, getArguments());} 71 public String getErrorProperty() {throw new Error ("method not supported");} 72 } 73 | Popular Tags |