Databases Reference
In-Depth Information
throws SQLException
{
raiseError(s, resourcebundle, s1, new Object[0]);
}
public static void raiseError(String s, ResourceBundle resourcebundle, String s1,
Object aobj[])
throws SQLException
{
throw new SQLException(getText(resourcebundle, s1, aobj), s);
}
public static String getText(ResourceBundle resourcebundle, String s)
{
return getText(resourcebundle, s, new Object[0]);
}
public static String getText(ResourceBundle resourcebundle, String s, Object obj)
{
return getText(resourcebundle, s, new Object[] {
obj
});
}
public static String getText(ResourceBundle resourcebundle, String s, Object
aobj[])
{
if(resourcebundle == null)
return "unable to load resource bundle for message key " + s;
try
{
return MessageFormat.format(resourcebundle.getString(s), aobj);
}
catch(MissingResourceException missingresourceexception)
{
return "unable to find error message for key " + s;
}
}
public static final String DEFAULT_SQLSTATE = "46000";
public static final String UNSUPPORTED_FEATURE_SQLSTATE = "46110";
public static final String INVALID_CLASS_DECLARATION_SQLSTATE = "46120";
public static final String INVALID_COLUMN_NAME_SQLSTATE = "46121";
public static final String INVALID_PROFILE_STATE_SQLSTATE = "46130";
}
Notice that all values and methods are visible and that the only disad-
vantage is that variables are named s, s1, obj, and so on. Disassembly is even
possible using the javap command built into the JDK, but it can only pro-
vide you with a disassembly at the VM instruction level or with a detailed
list of signatures, as follows:
 
Search WWH ::




Custom Search