Search in sources :

Example 1 with MySQLTransactionRollbackException

use of com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException in project aws-mysql-jdbc by awslabs.

the class ExceptionsTest method testConstructors.

@Test
public void testConstructors() {
    new CommunicationsException(TEST_MESSAGE, new Throwable());
    new CommunicationsException((JdbcConnection) this.conn, new PacketSentTimeHolder() {
    }, new PacketReceivedTimeHolder() {
    }, new Exception());
    new ConnectionFeatureNotAvailableException(TEST_MESSAGE, new Throwable());
    new ConnectionFeatureNotAvailableException((JdbcConnection) this.conn, new PacketSentTimeHolder() {
    }, new Exception());
    new MysqlDataTruncation(TEST_MESSAGE, 0, false, false, 0, 0, 0);
    new MySQLQueryInterruptedException();
    new MySQLQueryInterruptedException(TEST_MESSAGE);
    new MySQLQueryInterruptedException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLQueryInterruptedException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLStatementCancelledException();
    new MySQLStatementCancelledException(TEST_MESSAGE);
    new MySQLStatementCancelledException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLStatementCancelledException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLTimeoutException();
    new MySQLTimeoutException(TEST_MESSAGE);
    new MySQLTimeoutException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLTimeoutException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLTransactionRollbackException();
    new MySQLTransactionRollbackException(TEST_MESSAGE);
    new MySQLTransactionRollbackException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLTransactionRollbackException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new NotUpdatable(TEST_MESSAGE);
    new OperationNotSupportedException();
    new OperationNotSupportedException(TEST_MESSAGE);
    new PacketTooBigException(TEST_MESSAGE);
    new PacketTooBigException(0, 100);
    new SQLError();
}
Also used : OperationNotSupportedException(com.mysql.cj.jdbc.exceptions.OperationNotSupportedException) PacketTooBigException(com.mysql.cj.jdbc.exceptions.PacketTooBigException) ConnectionFeatureNotAvailableException(com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException) MysqlDataTruncation(com.mysql.cj.jdbc.exceptions.MysqlDataTruncation) MySQLTransactionRollbackException(com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException) PacketReceivedTimeHolder(com.mysql.cj.protocol.PacketReceivedTimeHolder) MySQLStatementCancelledException(com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException) MySQLQueryInterruptedException(com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException) OperationNotSupportedException(com.mysql.cj.jdbc.exceptions.OperationNotSupportedException) ConnectionFeatureNotAvailableException(com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException) MySQLTransactionRollbackException(com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException) SQLException(java.sql.SQLException) PacketTooBigException(com.mysql.cj.jdbc.exceptions.PacketTooBigException) MySQLTimeoutException(com.mysql.cj.jdbc.exceptions.MySQLTimeoutException) CommunicationsException(com.mysql.cj.jdbc.exceptions.CommunicationsException) NotUpdatable(com.mysql.cj.jdbc.exceptions.NotUpdatable) MySQLTimeoutException(com.mysql.cj.jdbc.exceptions.MySQLTimeoutException) SQLError(com.mysql.cj.jdbc.exceptions.SQLError) PacketSentTimeHolder(com.mysql.cj.protocol.PacketSentTimeHolder) MySQLStatementCancelledException(com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException) CommunicationsException(com.mysql.cj.jdbc.exceptions.CommunicationsException) MySQLQueryInterruptedException(com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException) Test(org.junit.jupiter.api.Test)

Example 2 with MySQLTransactionRollbackException

use of com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException in project ABC by RuiPinto96274.

the class ExceptionsTest method testConstructors.

@Test
public void testConstructors() {
    new CommunicationsException(TEST_MESSAGE, new Throwable());
    new CommunicationsException((JdbcConnection) this.conn, new PacketSentTimeHolder() {
    }, new PacketReceivedTimeHolder() {
    }, new Exception());
    new ConnectionFeatureNotAvailableException(TEST_MESSAGE, new Throwable());
    new ConnectionFeatureNotAvailableException((JdbcConnection) this.conn, new PacketSentTimeHolder() {
    }, new Exception());
    new MysqlDataTruncation(TEST_MESSAGE, 0, false, false, 0, 0, 0);
    new MySQLQueryInterruptedException();
    new MySQLQueryInterruptedException(TEST_MESSAGE);
    new MySQLQueryInterruptedException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLQueryInterruptedException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLStatementCancelledException();
    new MySQLStatementCancelledException(TEST_MESSAGE);
    new MySQLStatementCancelledException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLStatementCancelledException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLTimeoutException();
    new MySQLTimeoutException(TEST_MESSAGE);
    new MySQLTimeoutException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLTimeoutException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLTransactionRollbackException();
    new MySQLTransactionRollbackException(TEST_MESSAGE);
    new MySQLTransactionRollbackException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLTransactionRollbackException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new NotUpdatable(TEST_MESSAGE);
    new OperationNotSupportedException();
    new OperationNotSupportedException(TEST_MESSAGE);
    new PacketTooBigException(TEST_MESSAGE);
    new PacketTooBigException(0, 100);
    new SQLError();
}
Also used : OperationNotSupportedException(com.mysql.cj.jdbc.exceptions.OperationNotSupportedException) PacketTooBigException(com.mysql.cj.jdbc.exceptions.PacketTooBigException) ConnectionFeatureNotAvailableException(com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException) MysqlDataTruncation(com.mysql.cj.jdbc.exceptions.MysqlDataTruncation) MySQLTransactionRollbackException(com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException) PacketReceivedTimeHolder(com.mysql.cj.protocol.PacketReceivedTimeHolder) MySQLStatementCancelledException(com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException) MySQLQueryInterruptedException(com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException) OperationNotSupportedException(com.mysql.cj.jdbc.exceptions.OperationNotSupportedException) ConnectionFeatureNotAvailableException(com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException) MySQLTransactionRollbackException(com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException) SQLException(java.sql.SQLException) PacketTooBigException(com.mysql.cj.jdbc.exceptions.PacketTooBigException) MySQLTimeoutException(com.mysql.cj.jdbc.exceptions.MySQLTimeoutException) CommunicationsException(com.mysql.cj.jdbc.exceptions.CommunicationsException) NotUpdatable(com.mysql.cj.jdbc.exceptions.NotUpdatable) MySQLTimeoutException(com.mysql.cj.jdbc.exceptions.MySQLTimeoutException) SQLError(com.mysql.cj.jdbc.exceptions.SQLError) PacketSentTimeHolder(com.mysql.cj.protocol.PacketSentTimeHolder) MySQLStatementCancelledException(com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException) CommunicationsException(com.mysql.cj.jdbc.exceptions.CommunicationsException) MySQLQueryInterruptedException(com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException) Test(org.junit.jupiter.api.Test)

Example 3 with MySQLTransactionRollbackException

use of com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException in project JavaSegundasQuintas by ecteruel.

the class ExceptionsTest method testConstructors.

@Test
public void testConstructors() {
    new CommunicationsException(TEST_MESSAGE, new Throwable());
    new CommunicationsException((JdbcConnection) this.conn, new PacketSentTimeHolder() {
    }, new PacketReceivedTimeHolder() {
    }, new Exception());
    new ConnectionFeatureNotAvailableException(TEST_MESSAGE, new Throwable());
    new ConnectionFeatureNotAvailableException((JdbcConnection) this.conn, new PacketSentTimeHolder() {
    }, new Exception());
    new MysqlDataTruncation(TEST_MESSAGE, 0, false, false, 0, 0, 0);
    new MySQLQueryInterruptedException();
    new MySQLQueryInterruptedException(TEST_MESSAGE);
    new MySQLQueryInterruptedException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLQueryInterruptedException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLStatementCancelledException();
    new MySQLStatementCancelledException(TEST_MESSAGE);
    new MySQLStatementCancelledException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLStatementCancelledException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLTimeoutException();
    new MySQLTimeoutException(TEST_MESSAGE);
    new MySQLTimeoutException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLTimeoutException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new MySQLTransactionRollbackException();
    new MySQLTransactionRollbackException(TEST_MESSAGE);
    new MySQLTransactionRollbackException(TEST_MESSAGE, TEST_SQL_STATE);
    new MySQLTransactionRollbackException(TEST_MESSAGE, TEST_SQL_STATE, 0);
    new NotUpdatable(TEST_MESSAGE);
    new OperationNotSupportedException();
    new OperationNotSupportedException(TEST_MESSAGE);
    new PacketTooBigException(TEST_MESSAGE);
    new PacketTooBigException(0, 100);
    new SQLError();
}
Also used : OperationNotSupportedException(com.mysql.cj.jdbc.exceptions.OperationNotSupportedException) PacketTooBigException(com.mysql.cj.jdbc.exceptions.PacketTooBigException) ConnectionFeatureNotAvailableException(com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException) MysqlDataTruncation(com.mysql.cj.jdbc.exceptions.MysqlDataTruncation) MySQLTransactionRollbackException(com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException) PacketReceivedTimeHolder(com.mysql.cj.protocol.PacketReceivedTimeHolder) MySQLStatementCancelledException(com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException) MySQLQueryInterruptedException(com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException) OperationNotSupportedException(com.mysql.cj.jdbc.exceptions.OperationNotSupportedException) ConnectionFeatureNotAvailableException(com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException) MySQLTransactionRollbackException(com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException) SQLException(java.sql.SQLException) PacketTooBigException(com.mysql.cj.jdbc.exceptions.PacketTooBigException) MySQLTimeoutException(com.mysql.cj.jdbc.exceptions.MySQLTimeoutException) CommunicationsException(com.mysql.cj.jdbc.exceptions.CommunicationsException) NotUpdatable(com.mysql.cj.jdbc.exceptions.NotUpdatable) MySQLTimeoutException(com.mysql.cj.jdbc.exceptions.MySQLTimeoutException) SQLError(com.mysql.cj.jdbc.exceptions.SQLError) PacketSentTimeHolder(com.mysql.cj.protocol.PacketSentTimeHolder) MySQLStatementCancelledException(com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException) CommunicationsException(com.mysql.cj.jdbc.exceptions.CommunicationsException) MySQLQueryInterruptedException(com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException) Test(org.junit.jupiter.api.Test)

Aggregations

CommunicationsException (com.mysql.cj.jdbc.exceptions.CommunicationsException)3 ConnectionFeatureNotAvailableException (com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException)3 MySQLQueryInterruptedException (com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException)3 MySQLStatementCancelledException (com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException)3 MySQLTimeoutException (com.mysql.cj.jdbc.exceptions.MySQLTimeoutException)3 MySQLTransactionRollbackException (com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException)3 MysqlDataTruncation (com.mysql.cj.jdbc.exceptions.MysqlDataTruncation)3 NotUpdatable (com.mysql.cj.jdbc.exceptions.NotUpdatable)3 OperationNotSupportedException (com.mysql.cj.jdbc.exceptions.OperationNotSupportedException)3 PacketTooBigException (com.mysql.cj.jdbc.exceptions.PacketTooBigException)3 SQLError (com.mysql.cj.jdbc.exceptions.SQLError)3 PacketReceivedTimeHolder (com.mysql.cj.protocol.PacketReceivedTimeHolder)3 PacketSentTimeHolder (com.mysql.cj.protocol.PacketSentTimeHolder)3 SQLException (java.sql.SQLException)3 Test (org.junit.jupiter.api.Test)3