java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
com.aoapps.lang.sql.LocalizedSQLException
- All Implemented Interfaces:
LocalizedException,Serializable,Iterable<Throwable>
Extends
SQLException to provide exceptions with user locale error messages.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLocalizedSQLException(String sqlState, int vendorCode, Resources resources, String key) LocalizedSQLException(String sqlState, int vendorCode, Resources resources, String key, Serializable... args) LocalizedSQLException(String sqlState, int vendorCode, Throwable cause, Resources resources, String key) LocalizedSQLException(String sqlState, int vendorCode, Throwable cause, Resources resources, String key, Serializable... args) LocalizedSQLException(String sqlState, Resources resources, String key) LocalizedSQLException(String sqlState, Resources resources, String key, Serializable... args) LocalizedSQLException(String sqlState, Throwable cause, Resources resources, String key) LocalizedSQLException(String sqlState, Throwable cause, Resources resources, String key, Serializable... args) -
Method Summary
Modifier and TypeMethodDescriptionfinal Serializable[]getArgs()final StringgetKey()final ResourcesGets the resources used to generate the message ornullwhen the message is not localized and uses a default.Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
resources
-
key
-
args
-
-
Constructor Details
-
LocalizedSQLException
-
LocalizedSQLException
public LocalizedSQLException(String sqlState, int vendorCode, Resources resources, String key, Serializable... args) -
LocalizedSQLException
-
LocalizedSQLException
public LocalizedSQLException(String sqlState, Resources resources, String key, Serializable... args) -
LocalizedSQLException
-
LocalizedSQLException
public LocalizedSQLException(String sqlState, Throwable cause, Resources resources, String key, Serializable... args) -
LocalizedSQLException
-
LocalizedSQLException
public LocalizedSQLException(String sqlState, int vendorCode, Throwable cause, Resources resources, String key, Serializable... args)
-
-
Method Details
-
getLocalizedMessage
- Specified by:
getLocalizedMessagein interfaceLocalizedException- Overrides:
getLocalizedMessagein classThrowable
-
getResources
Description copied from interface:LocalizedExceptionGets the resources used to generate the message ornullwhen the message is not localized and uses a default.- Specified by:
getResourcesin interfaceLocalizedException
-
getKey
- Specified by:
getKeyin interfaceLocalizedException
-
getArgs
- Specified by:
getArgsin interfaceLocalizedException- Returns:
- No defensive copy
-
