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 MariaDbConnection
connection
static ExceptionFactory
INSTANCE
private Options
options
private java.sql.Statement
statement
private long
threadId
-
Constructor Summary
Constructors Modifier Constructor Description private
ExceptionFactory(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.String
buildMsgText(java.lang.String initialMessage, long threadId, Options options, java.lang.Exception cause)
java.sql.SQLException
create(java.lang.String message)
java.sql.SQLException
create(java.lang.String message, java.lang.Exception cause)
java.sql.SQLException
create(java.lang.String message, java.lang.String sqlState)
java.sql.SQLException
create(java.lang.String message, java.lang.String sqlState, int errorCode)
java.sql.SQLException
create(java.lang.String message, java.lang.String sqlState, int errorCode, java.lang.Exception cause)
java.sql.SQLException
create(java.lang.String message, java.lang.String sqlState, java.lang.Exception cause)
java.sql.SQLException
create(java.sql.SQLException cause)
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)
Options
getOptions()
long
getThreadId()
java.sql.SQLException
notSupported(java.lang.String message)
static ExceptionFactory
of(long threadId, Options options)
ExceptionFactory
raiseStatementError(MariaDbConnection connection, java.sql.Statement stmt)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-