Package org.firebirdsql.gds
Class GDSExceptionHelper
java.lang.Object
org.firebirdsql.gds.GDSExceptionHelper
This class returns messages for the specified error code.
This loads all messages during class initialization.
- Version:
- 1.0
- Author:
- David Jencks, Roman Rokytskyy, Blas Rodriguez Somoza, Mark Rotteveel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThis class wraps message template obtained from isc_error_msg.properties file and allows to set parameters to the message. -
Method Summary
Modifier and TypeMethodDescriptiongetMessage(int code) This method returns a message for the specified error code.static StringgetSQLState(int code) Get the SQL state for the specified error code.static StringgetSQLState(int code, String defaultSQLState) Get the SQL state for the specified error code.
-
Method Details
-
getMessage
This method returns a message for the specified error code.- Parameters:
code- Firebird error code- Returns:
- instance of
GDSExceptionHelper.GDSMessageclass where you can set desired parameters.
-
getSQLState
Get the SQL state for the specified error code.- Parameters:
code- Firebird error code- Returns:
- SQL state for the Firebird error code, "HY000" if nothing found.
-
getSQLState
Get the SQL state for the specified error code.- Parameters:
code- Firebird error codedefaultSQLState- The default SQLState to return- Returns:
- SQL state for the Firebird error code, or
defaultSQLStateif nothing found.
-