Class ExceptionFactory
- java.lang.Object
-
- org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory
-
public final class ExceptionFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private MariaDbConnectionconnectionstatic ExceptionFactoryINSTANCEprivate Optionsoptionsprivate java.sql.Statementstatementprivate longthreadId
-
Constructor Summary
Constructors Modifier Constructor Description privateExceptionFactory(long threadId, Options options)ExceptionFactory(long threadId, Options options, MariaDbConnection connection, java.sql.Statement statement)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringbuildMsgText(java.lang.String initialMessage, long threadId, Options options, java.lang.Exception cause)java.sql.SQLExceptioncreate(java.lang.String message)java.sql.SQLExceptioncreate(java.lang.String message, java.lang.Exception cause)java.sql.SQLExceptioncreate(java.lang.String message, java.lang.String sqlState)java.sql.SQLExceptioncreate(java.lang.String message, java.lang.String sqlState, int errorCode)java.sql.SQLExceptioncreate(java.lang.String message, java.lang.String sqlState, int errorCode, java.lang.Exception cause)java.sql.SQLExceptioncreate(java.lang.String message, java.lang.String sqlState, java.lang.Exception cause)java.sql.SQLExceptioncreate(java.sql.SQLException cause)private static java.sql.SQLExceptioncreateException(java.lang.String initialMessage, java.lang.String sqlState, int errorCode, long threadId, Options options, MariaDbConnection connection, java.sql.Statement statement, java.lang.Exception cause)OptionsgetOptions()longgetThreadId()java.sql.SQLExceptionnotSupported(java.lang.String message)static ExceptionFactoryof(long threadId, Options options)ExceptionFactoryraiseStatementError(MariaDbConnection connection, java.sql.Statement stmt)java.lang.StringtoString()
-
-
-
Field Detail
-
INSTANCE
public static final ExceptionFactory INSTANCE
-
threadId
private final long threadId
-
options
private final Options options
-
connection
private MariaDbConnection connection
-
statement
private java.sql.Statement statement
-
-
Constructor Detail
-
ExceptionFactory
public ExceptionFactory(long threadId, Options options, MariaDbConnection connection, java.sql.Statement statement)
-
ExceptionFactory
private ExceptionFactory(long threadId, Options options)
-
-
Method Detail
-
of
public static ExceptionFactory of(long threadId, Options options)
-
createException
private static java.sql.SQLException createException(java.lang.String initialMessage, java.lang.String sqlState, int errorCode, long threadId, Options options, MariaDbConnection connection, java.sql.Statement statement, java.lang.Exception cause)
-
buildMsgText
private static java.lang.String buildMsgText(java.lang.String initialMessage, long threadId, Options options, java.lang.Exception cause)
-
raiseStatementError
public ExceptionFactory raiseStatementError(MariaDbConnection connection, java.sql.Statement stmt)
-
create
public java.sql.SQLException create(java.sql.SQLException cause)
-
notSupported
public java.sql.SQLException notSupported(java.lang.String message)
-
create
public java.sql.SQLException create(java.lang.String message)
-
create
public java.sql.SQLException create(java.lang.String message, java.lang.Exception cause)
-
create
public java.sql.SQLException create(java.lang.String message, java.lang.String sqlState)
-
create
public java.sql.SQLException create(java.lang.String message, java.lang.String sqlState, java.lang.Exception cause)
-
create
public java.sql.SQLException create(java.lang.String message, java.lang.String sqlState, int errorCode)
-
create
public java.sql.SQLException create(java.lang.String message, java.lang.String sqlState, int errorCode, java.lang.Exception cause)
-
getThreadId
public long getThreadId()
-
getOptions
public Options getOptions()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-