diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/SQLExceptionHandler.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/SQLExceptionHandler.java deleted file mode 100644 index e9d957b03e638..0000000000000 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/SQLExceptionHandler.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.shardingsphere.error; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; -import org.apache.shardingsphere.error.mapper.SQLDialectExceptionMapperFactory; -import org.apache.shardingsphere.infra.util.exception.ShardingSphereInsideException; -import org.apache.shardingsphere.infra.util.exception.sql.ShardingSphereSQLException; -import org.apache.shardingsphere.infra.util.exception.sql.UnknownSQLException; - -import java.sql.SQLException; - -/** - * SQL exception handler. - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public final class SQLExceptionHandler { - - /** - * Convert to SQL exception. - * - * @param databaseType database type - * @param insideException inside exception - * @return SQL exception - */ - public static SQLException convert(final String databaseType, final ShardingSphereInsideException insideException) { - if (insideException instanceof SQLDialectException) { - return SQLDialectExceptionMapperFactory.getInstance(databaseType).convert((SQLDialectException) insideException); - } - if (insideException instanceof ShardingSphereSQLException) { - return ((ShardingSphereSQLException) insideException).toSQLException(); - } - return new UnknownSQLException(insideException).toSQLException(); - } -} diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/SQLDialectException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/SQLDialectException.java similarity index 95% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/SQLDialectException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/SQLDialectException.java index 8bddf4454f94a..bad4e22c94a00 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/SQLDialectException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/SQLDialectException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect; +package org.apache.shardingsphere.error.exception; import org.apache.shardingsphere.infra.util.exception.ShardingSphereInsideException; diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/connection/TooManyConnectionsException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/connection/TooManyConnectionsException.java similarity index 88% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/connection/TooManyConnectionsException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/connection/TooManyConnectionsException.java index 8de451da6bb40..ac7da53764afe 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/connection/TooManyConnectionsException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/connection/TooManyConnectionsException.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.connection; +package org.apache.shardingsphere.error.exception.connection; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Too many connections exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/data/InsertColumnsAndValuesMismatchedException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/data/InsertColumnsAndValuesMismatchedException.java similarity index 90% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/data/InsertColumnsAndValuesMismatchedException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/data/InsertColumnsAndValuesMismatchedException.java index 804341d9c6ac7..4f3957b886f4f 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/data/InsertColumnsAndValuesMismatchedException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/data/InsertColumnsAndValuesMismatchedException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.data; +package org.apache.shardingsphere.error.exception.data; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Insert columns and values mismatched exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/data/InvalidParameterValueException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/data/InvalidParameterValueException.java similarity index 90% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/data/InvalidParameterValueException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/data/InvalidParameterValueException.java index 20d27002cd209..5adf4933295d4 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/data/InvalidParameterValueException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/data/InvalidParameterValueException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.data; +package org.apache.shardingsphere.error.exception.data; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Invalid parameter value exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/DatabaseCreateExistsException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/DatabaseCreateExistsException.java similarity index 89% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/DatabaseCreateExistsException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/DatabaseCreateExistsException.java index f284d043aab6f..dc08d0247ea35 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/DatabaseCreateExistsException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/DatabaseCreateExistsException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.syntax.database; +package org.apache.shardingsphere.error.exception.syntax.database; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Database create exists exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/DatabaseDropNotExistsException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/DatabaseDropNotExistsException.java similarity index 89% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/DatabaseDropNotExistsException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/DatabaseDropNotExistsException.java index 3653ab6a7dc0c..c23a277997759 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/DatabaseDropNotExistsException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/DatabaseDropNotExistsException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.syntax.database; +package org.apache.shardingsphere.error.exception.syntax.database; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Database drop exists exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/NoDatabaseSelectedException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/NoDatabaseSelectedException.java similarity index 87% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/NoDatabaseSelectedException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/NoDatabaseSelectedException.java index 3627d42d4cfb7..ba6684ffc3c11 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/NoDatabaseSelectedException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/NoDatabaseSelectedException.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.syntax.database; +package org.apache.shardingsphere.error.exception.syntax.database; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * No database selected exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/UnknownDatabaseException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/UnknownDatabaseException.java similarity index 89% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/UnknownDatabaseException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/UnknownDatabaseException.java index 1f1bb3600bdd2..05c181f70826a 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/database/UnknownDatabaseException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/database/UnknownDatabaseException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.syntax.database; +package org.apache.shardingsphere.error.exception.syntax.database; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Unknown database exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/table/NoSuchTableException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/table/NoSuchTableException.java similarity index 89% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/table/NoSuchTableException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/table/NoSuchTableException.java index 05ed2422ab9ac..b29fbf93c5ba9 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/table/NoSuchTableException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/table/NoSuchTableException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.syntax.table; +package org.apache.shardingsphere.error.exception.syntax.table; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * No such table exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/table/TableExistsException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/table/TableExistsException.java similarity index 89% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/table/TableExistsException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/table/TableExistsException.java index e21eeeb4e3e9f..c871e6c220fda 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/syntax/table/TableExistsException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/syntax/table/TableExistsException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.syntax.table; +package org.apache.shardingsphere.error.exception.syntax.table; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Table exists exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/transaction/InTransactionException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/transaction/InTransactionException.java similarity index 89% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/transaction/InTransactionException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/transaction/InTransactionException.java index b98b0e0db3bb1..212efb91d6ba5 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/transaction/InTransactionException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/transaction/InTransactionException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.transaction; +package org.apache.shardingsphere.error.exception.transaction; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * In transaction exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/transaction/TableModifyInTransactionException.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/transaction/TableModifyInTransactionException.java similarity index 89% rename from shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/transaction/TableModifyInTransactionException.java rename to shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/transaction/TableModifyInTransactionException.java index 032e06a31b8ac..334813df03942 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/dialect/transaction/TableModifyInTransactionException.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/exception/transaction/TableModifyInTransactionException.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.error.dialect.transaction; +package org.apache.shardingsphere.error.exception.transaction; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; /** * Table modify in transaction exception. diff --git a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/mapper/SQLDialectExceptionMapper.java b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/mapper/SQLDialectExceptionMapper.java index 21218445755ea..0b708a4b18752 100644 --- a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/mapper/SQLDialectExceptionMapper.java +++ b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/mapper/SQLDialectExceptionMapper.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.error.mapper; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.SQLDialectException; import org.apache.shardingsphere.infra.util.spi.annotation.SingletonSPI; import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI; diff --git a/shardingsphere-error/shardingsphere-mysql-error/src/main/java/org/apache/shardingsphere/error/mysql/mapper/MySQLDialectExceptionMapper.java b/shardingsphere-error/shardingsphere-mysql-error/src/main/java/org/apache/shardingsphere/error/mysql/mapper/MySQLDialectExceptionMapper.java index 1f2827d4806c6..88010738fef0c 100644 --- a/shardingsphere-error/shardingsphere-mysql-error/src/main/java/org/apache/shardingsphere/error/mysql/mapper/MySQLDialectExceptionMapper.java +++ b/shardingsphere-error/shardingsphere-mysql-error/src/main/java/org/apache/shardingsphere/error/mysql/mapper/MySQLDialectExceptionMapper.java @@ -17,16 +17,16 @@ package org.apache.shardingsphere.error.mysql.mapper; -import org.apache.shardingsphere.error.dialect.SQLDialectException; -import org.apache.shardingsphere.error.dialect.connection.TooManyConnectionsException; -import org.apache.shardingsphere.error.dialect.data.InsertColumnsAndValuesMismatchedException; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseCreateExistsException; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseDropNotExistsException; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; -import org.apache.shardingsphere.error.dialect.syntax.table.NoSuchTableException; -import org.apache.shardingsphere.error.dialect.syntax.table.TableExistsException; -import org.apache.shardingsphere.error.dialect.transaction.TableModifyInTransactionException; +import org.apache.shardingsphere.error.exception.SQLDialectException; +import org.apache.shardingsphere.error.exception.connection.TooManyConnectionsException; +import org.apache.shardingsphere.error.exception.data.InsertColumnsAndValuesMismatchedException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseCreateExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseDropNotExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.table.NoSuchTableException; +import org.apache.shardingsphere.error.exception.syntax.table.TableExistsException; +import org.apache.shardingsphere.error.exception.transaction.TableModifyInTransactionException; import org.apache.shardingsphere.error.mapper.SQLDialectExceptionMapper; import org.apache.shardingsphere.error.mysql.code.MySQLVendorError; import org.apache.shardingsphere.infra.util.exception.sql.UnknownSQLException; diff --git a/shardingsphere-error/shardingsphere-postgresql-error/src/main/java/org/apache/shardingsphere/error/postgresql/mapper/PostgreSQLDialectExceptionMapper.java b/shardingsphere-error/shardingsphere-postgresql-error/src/main/java/org/apache/shardingsphere/error/postgresql/mapper/PostgreSQLDialectExceptionMapper.java index a4693a30f8635..84b4368f58fae 100644 --- a/shardingsphere-error/shardingsphere-postgresql-error/src/main/java/org/apache/shardingsphere/error/postgresql/mapper/PostgreSQLDialectExceptionMapper.java +++ b/shardingsphere-error/shardingsphere-postgresql-error/src/main/java/org/apache/shardingsphere/error/postgresql/mapper/PostgreSQLDialectExceptionMapper.java @@ -19,12 +19,12 @@ import org.apache.shardingsphere.error.mapper.SQLDialectExceptionMapper; import org.apache.shardingsphere.error.postgresql.code.PostgreSQLVendorError; -import org.apache.shardingsphere.error.dialect.transaction.InTransactionException; -import org.apache.shardingsphere.error.dialect.data.InsertColumnsAndValuesMismatchedException; -import org.apache.shardingsphere.error.dialect.data.InvalidParameterValueException; -import org.apache.shardingsphere.error.dialect.connection.TooManyConnectionsException; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseCreateExistsException; -import org.apache.shardingsphere.error.dialect.SQLDialectException; +import org.apache.shardingsphere.error.exception.transaction.InTransactionException; +import org.apache.shardingsphere.error.exception.data.InsertColumnsAndValuesMismatchedException; +import org.apache.shardingsphere.error.exception.data.InvalidParameterValueException; +import org.apache.shardingsphere.error.exception.connection.TooManyConnectionsException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseCreateExistsException; +import org.apache.shardingsphere.error.exception.SQLDialectException; import org.postgresql.util.PSQLException; import org.postgresql.util.PSQLState; diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java index 13d58457c8bb7..e753694dea7bf 100644 --- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java +++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java @@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext; import org.apache.shardingsphere.infra.datetime.DatetimeService; import org.apache.shardingsphere.infra.datetime.DatetimeServiceFactory; -import org.apache.shardingsphere.error.dialect.data.InsertColumnsAndValuesMismatchedException; +import org.apache.shardingsphere.error.exception.data.InsertColumnsAndValuesMismatchedException; import org.apache.shardingsphere.infra.exception.ShardingSphereException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.sharding.route.engine.condition.ExpressionConditionUtils; diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java index f9ea7ffd7cc86..44ace5b919fd1 100644 --- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java +++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java @@ -20,8 +20,8 @@ import org.apache.shardingsphere.infra.exception.ShardingSphereException; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema; import org.apache.shardingsphere.infra.route.context.RouteContext; -import org.apache.shardingsphere.error.dialect.syntax.table.NoSuchTableException; -import org.apache.shardingsphere.error.dialect.syntax.table.TableExistsException; +import org.apache.shardingsphere.error.exception.syntax.table.NoSuchTableException; +import org.apache.shardingsphere.error.exception.syntax.table.TableExistsException; import org.apache.shardingsphere.sharding.route.engine.validator.ShardingStatementValidator; import org.apache.shardingsphere.sharding.rule.ShardingRule; import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexSegment; diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java index ee49e8f469995..e2a2ca9cbc029 100644 --- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java +++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java @@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.binder.segment.insert.values.InsertSelectContext; import org.apache.shardingsphere.infra.binder.segment.insert.values.InsertValueContext; import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext; -import org.apache.shardingsphere.error.dialect.data.InsertColumnsAndValuesMismatchedException; +import org.apache.shardingsphere.error.exception.data.InsertColumnsAndValuesMismatchedException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.sharding.route.engine.condition.ShardingCondition; import org.apache.shardingsphere.sharding.route.engine.condition.engine.impl.InsertClauseShardingConditionEngine; diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateFunctionStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateFunctionStatementValidatorTest.java index e5933eaa4b207..e64bf33173df8 100644 --- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateFunctionStatementValidatorTest.java +++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateFunctionStatementValidatorTest.java @@ -20,8 +20,8 @@ import org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext; import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext; import org.apache.shardingsphere.infra.database.DefaultDatabase; -import org.apache.shardingsphere.error.dialect.syntax.table.NoSuchTableException; -import org.apache.shardingsphere.error.dialect.syntax.table.TableExistsException; +import org.apache.shardingsphere.error.exception.syntax.table.NoSuchTableException; +import org.apache.shardingsphere.error.exception.syntax.table.TableExistsException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingCreateFunctionStatementValidator; import org.apache.shardingsphere.sharding.rule.ShardingRule; diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java index c1467d44bf172..5314744b2093d 100644 --- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java +++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java @@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.exception.ShardingSphereException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereTable; -import org.apache.shardingsphere.error.dialect.syntax.table.NoSuchTableException; +import org.apache.shardingsphere.error.exception.syntax.table.NoSuchTableException; import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingCreateIndexStatementValidator; import org.apache.shardingsphere.sharding.rule.ShardingRule; import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexNameSegment; diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateProcedureStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateProcedureStatementValidatorTest.java index 8f82a57050186..1571c3bdf2300 100644 --- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateProcedureStatementValidatorTest.java +++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateProcedureStatementValidatorTest.java @@ -20,8 +20,8 @@ import org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext; import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext; import org.apache.shardingsphere.infra.database.DefaultDatabase; -import org.apache.shardingsphere.error.dialect.syntax.table.NoSuchTableException; -import org.apache.shardingsphere.error.dialect.syntax.table.TableExistsException; +import org.apache.shardingsphere.error.exception.syntax.table.NoSuchTableException; +import org.apache.shardingsphere.error.exception.syntax.table.TableExistsException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingCreateProcedureStatementValidator; import org.apache.shardingsphere.sharding.rule.ShardingRule; diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java index 5cf8e27ca88b5..f34e030158cb6 100644 --- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java +++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java @@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.route.context.RouteContext; import org.apache.shardingsphere.infra.route.context.RouteMapper; import org.apache.shardingsphere.infra.route.context.RouteUnit; -import org.apache.shardingsphere.error.dialect.syntax.table.TableExistsException; +import org.apache.shardingsphere.error.exception.syntax.table.TableExistsException; import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingCreateTableStatementValidator; import org.apache.shardingsphere.sharding.rule.ShardingRule; import org.apache.shardingsphere.sharding.rule.TableRule; diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/InsertStatementContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/InsertStatementContext.java index 9ee6a284f202b..0eb93e0ffaa88 100644 --- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/InsertStatementContext.java +++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/InsertStatementContext.java @@ -28,8 +28,8 @@ import org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext; import org.apache.shardingsphere.infra.binder.type.TableAvailable; import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema; import org.apache.shardingsphere.sql.parser.sql.common.extractor.TableExtractor; diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java index 2082315329214..50321587b6220 100644 --- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java +++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java @@ -39,8 +39,8 @@ import org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext; import org.apache.shardingsphere.infra.binder.type.TableAvailable; import org.apache.shardingsphere.infra.binder.type.WhereAvailable; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema; import org.apache.shardingsphere.sql.parser.sql.common.constant.ParameterMarkerType; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutor.java index 99a0f2fd9be7f..edf06d3937a01 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutor.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutor.java @@ -43,7 +43,7 @@ import org.apache.shardingsphere.proxy.backend.communication.jdbc.statement.JDBCBackendStatement; import org.apache.shardingsphere.proxy.backend.context.BackendExecutorContext; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.transaction.TableModifyInTransactionException; +import org.apache.shardingsphere.error.exception.transaction.TableModifyInTransactionException; import org.apache.shardingsphere.proxy.backend.session.transaction.TransactionStatus; import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement; import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CloseStatement; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ReactiveProxySQLExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ReactiveProxySQLExecutor.java index b488a755d21ad..e56ab148593ba 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ReactiveProxySQLExecutor.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ReactiveProxySQLExecutor.java @@ -36,7 +36,7 @@ import org.apache.shardingsphere.proxy.backend.communication.vertx.executor.ProxyReactiveExecutor; import org.apache.shardingsphere.proxy.backend.context.BackendExecutorContext; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.transaction.TableModifyInTransactionException; +import org.apache.shardingsphere.error.exception.transaction.TableModifyInTransactionException; import org.apache.shardingsphere.proxy.backend.session.transaction.TransactionStatus; import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement; import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DDLStatement; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/ProxyContext.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/ProxyContext.java index 3716df5c9d8ce..2afc9ca2fb922 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/ProxyContext.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/ProxyContext.java @@ -26,7 +26,7 @@ import org.apache.shardingsphere.infra.state.StateContext; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.proxy.backend.communication.jdbc.datasource.JDBCBackendDataSource; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; import java.util.Collection; import java.util.LinkedList; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/DatabaseRequiredBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/DatabaseRequiredBackendHandler.java index f77117e0198a5..98849c9ff8a8f 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/DatabaseRequiredBackendHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/DatabaseRequiredBackendHandler.java @@ -20,8 +20,8 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.DatabaseSegment; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowCreateDatabaseExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowCreateDatabaseExecutor.java index 4709f9a7dfe5f..c504da2c1b20a 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowCreateDatabaseExecutor.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowCreateDatabaseExecutor.java @@ -19,7 +19,7 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.executor.sql.execute.result.query.QueryResult; import org.apache.shardingsphere.infra.executor.sql.execute.result.query.QueryResultMetaData; import org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.raw.metadata.RawQueryResultColumnMetaData; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UnicastResourceShowExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UnicastResourceShowExecutor.java index 3946c9b7defca..ba12daffd343a 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UnicastResourceShowExecutor.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UnicastResourceShowExecutor.java @@ -33,7 +33,7 @@ import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngineFactory; import org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; import org.apache.shardingsphere.proxy.backend.exception.RuleNotExistedException; import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader; import org.apache.shardingsphere.proxy.backend.response.header.query.QueryHeader; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutor.java index 9d82cf28f69e8..d963cd9acabd4 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutor.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutor.java @@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.executor.check.SQLCheckEngine; import org.apache.shardingsphere.infra.rule.ShardingSphereRule; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; import org.apache.shardingsphere.proxy.backend.handler.admin.executor.DatabaseAdminExecutor; import org.apache.shardingsphere.sql.parser.sql.common.statement.dal.UseStatement; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/postgresql/executor/PostgreSQLSetCharsetExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/postgresql/executor/PostgreSQLSetCharsetExecutor.java index de9ba35bfa821..ba21c972c2416 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/postgresql/executor/PostgreSQLSetCharsetExecutor.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/postgresql/executor/PostgreSQLSetCharsetExecutor.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.proxy.backend.handler.admin.postgresql.executor; import org.apache.shardingsphere.db.protocol.CommonConstants; -import org.apache.shardingsphere.error.dialect.data.InvalidParameterValueException; +import org.apache.shardingsphere.error.exception.data.InvalidParameterValueException; import org.apache.shardingsphere.proxy.backend.handler.admin.postgresql.PostgreSQLCharacterSets; import org.apache.shardingsphere.proxy.backend.handler.admin.postgresql.PostgreSQLSessionVariableHandler; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandler.java index 271c155ef2c4b..867883f53609d 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandler.java @@ -23,7 +23,7 @@ import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine; import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngineFactory; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; import org.apache.shardingsphere.proxy.backend.exception.RuleNotExistedException; import org.apache.shardingsphere.proxy.backend.response.data.QueryResponseRow; import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandler.java index 28a2c36a68e5b..61505e7f8a258 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandler.java @@ -19,7 +19,7 @@ import lombok.RequiredArgsConstructor; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseCreateExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseCreateExistsException; import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader; import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader; import org.apache.shardingsphere.proxy.backend.handler.ProxyBackendHandler; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandler.java index 0274e8c4bf65e..33a44feb5ec8f 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandler.java @@ -24,8 +24,8 @@ import org.apache.shardingsphere.infra.metadata.user.Grantee; import org.apache.shardingsphere.infra.rule.ShardingSphereRule; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseDropNotExistsException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseDropNotExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader; import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandler.java index e211ed66a978c..1150e1a6d0741 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandler.java @@ -22,9 +22,9 @@ import org.apache.shardingsphere.infra.config.rule.RuleConfiguration; import org.apache.shardingsphere.infra.datasource.props.DataSourceProperties; import org.apache.shardingsphere.infra.datasource.props.DataSourcePropertiesCreator; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; import org.apache.shardingsphere.infra.exception.ShardingSphereException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.util.yaml.YamlEngine; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowReadwriteSplittingReadResourcesHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowReadwriteSplittingReadResourcesHandler.java index 314a026851516..b2d5ec7f09fec 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowReadwriteSplittingReadResourcesHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowReadwriteSplittingReadResourcesHandler.java @@ -20,8 +20,8 @@ import com.google.common.base.Strings; import org.apache.shardingsphere.infra.distsql.constant.ExportableConstants; import org.apache.shardingsphere.infra.distsql.constant.ExportableItemConstants; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.QualifiedDatabase; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowTableMetadataHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowTableMetadataHandler.java index f3b61a7f8c048..c7e5e721e9a55 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowTableMetadataHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ShowTableMetadataHandler.java @@ -20,8 +20,8 @@ import com.google.common.base.Strings; import org.apache.shardingsphere.distsql.parser.statement.ral.queryable.ShowTableMetadataStatement; import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereIndex; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetadataHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetadataHandler.java index d919716ef799b..9cd53169c674c 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetadataHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetadataHandler.java @@ -23,8 +23,8 @@ import org.apache.shardingsphere.infra.distsql.exception.DistSQLException; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.proxy.backend.handler.distsql.ral.UpdatableRALBackendHandler; /** diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetReadwriteSplittingStatusHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetReadwriteSplittingStatusHandler.java index 32f1c3af759d2..c8bf475226f38 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetReadwriteSplittingStatusHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetReadwriteSplittingStatusHandler.java @@ -23,8 +23,8 @@ import org.apache.shardingsphere.infra.distsql.constant.ExportableItemConstants; import org.apache.shardingsphere.infra.distsql.exception.DistSQLException; import org.apache.shardingsphere.infra.distsql.exception.resource.RequiredResourceMissedException; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.metadata.database.schema.QualifiedDatabase; import org.apache.shardingsphere.infra.rule.identifier.type.exportable.RuleExportEngine; import org.apache.shardingsphere.mode.manager.ContextManager; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/PreviewHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/PreviewHandler.java index 1401dc2b062ff..0195d5e608b89 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/PreviewHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/PreviewHandler.java @@ -34,9 +34,9 @@ import org.apache.shardingsphere.infra.context.kernel.KernelProcessor; import org.apache.shardingsphere.infra.database.type.DatabaseType; import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; import org.apache.shardingsphere.proxy.backend.exception.RuleNotExistedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit; import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode; import org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutorExceptionHandler; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java index 54ffd1b88086d..f14481ef26727 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java @@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType; import org.apache.shardingsphere.infra.database.type.dialect.OpenGaussDatabaseType; import org.apache.shardingsphere.infra.database.type.dialect.PostgreSQLDatabaseType; -import org.apache.shardingsphere.error.dialect.transaction.InTransactionException; +import org.apache.shardingsphere.error.exception.transaction.InTransactionException; import org.apache.shardingsphere.proxy.backend.communication.TransactionManager; import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.JDBCBackendConnection; import org.apache.shardingsphere.proxy.backend.communication.jdbc.transaction.JDBCBackendTransactionManager; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutorTest.java index 30b70fc0387ae..1527937575d2f 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutorTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutorTest.java @@ -36,7 +36,7 @@ import org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine; import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.JDBCBackendConnection; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.transaction.TableModifyInTransactionException; +import org.apache.shardingsphere.error.exception.transaction.TableModifyInTransactionException; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; import org.apache.shardingsphere.proxy.backend.util.ProxyContextRestorer; import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java index baa792d635e6f..116935019837f 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java @@ -26,7 +26,7 @@ import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.metadata.MetaDataContexts; import org.apache.shardingsphere.mode.metadata.persist.MetaDataPersistService; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; import org.apache.shardingsphere.proxy.backend.util.ProxyContextRestorer; import org.junit.Test; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/DatabaseOperateBackendHandlerFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/DatabaseOperateBackendHandlerFactoryTest.java index 6fbdf644f958e..ea9e2f07504df 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/DatabaseOperateBackendHandlerFactoryTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/DatabaseOperateBackendHandlerFactoryTest.java @@ -26,7 +26,7 @@ import org.apache.shardingsphere.mode.metadata.MetaDataContexts; import org.apache.shardingsphere.mode.metadata.persist.MetaDataPersistService; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseCreateExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseCreateExistsException; import org.apache.shardingsphere.proxy.backend.handler.database.DatabaseOperateBackendHandlerFactory; import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader; import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutorTest.java index afa79f93a3ef8..ce589f3582962 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutorTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/UseDatabaseExecutorTest.java @@ -26,7 +26,7 @@ import org.apache.shardingsphere.mode.metadata.MetaDataContexts; import org.apache.shardingsphere.mode.metadata.persist.MetaDataPersistService; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; import org.apache.shardingsphere.proxy.backend.util.ProxyContextRestorer; import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLUseStatement; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandlerTest.java index 3351fb3a33be1..81b74579d7907 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandlerTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/CreateDatabaseBackendHandlerTest.java @@ -22,7 +22,7 @@ import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.metadata.MetaDataContexts; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseCreateExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseCreateExistsException; import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader; import org.apache.shardingsphere.proxy.backend.util.ProxyContextRestorer; import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateDatabaseStatement; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandlerTest.java index 790cd7aaa2f0f..0cb3de78a70dd 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandlerTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DropDatabaseBackendHandlerTest.java @@ -21,7 +21,7 @@ import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.metadata.MetaDataContexts; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseDropNotExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseDropNotExistsException; import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader; import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandlerTest.java index d326186e15037..3cbe0e589f345 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandlerTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ExportDatabaseConfigurationHandlerTest.java @@ -20,8 +20,8 @@ import lombok.SneakyThrows; import org.apache.shardingsphere.distsql.parser.statement.ral.queryable.ExportDatabaseConfigurationStatement; import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereColumn; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereIndex; diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/FrontendChannelLimitationInboundHandler.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/FrontendChannelLimitationInboundHandler.java index 3ca06adc3f900..2e1584d443edf 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/FrontendChannelLimitationInboundHandler.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/FrontendChannelLimitationInboundHandler.java @@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.shardingsphere.proxy.frontend.connection.ConnectionLimitContext; -import org.apache.shardingsphere.error.dialect.connection.TooManyConnectionsException; +import org.apache.shardingsphere.error.exception.connection.TooManyConnectionsException; import org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine; /** diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/exception/ExpectedExceptionsTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/exception/ExpectedExceptionsTest.java index 796d142b61273..24fedf9064c16 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/exception/ExpectedExceptionsTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/exception/ExpectedExceptionsTest.java @@ -20,7 +20,7 @@ import org.apache.shardingsphere.infra.config.exception.ShardingSphereConfigurationException; import org.apache.shardingsphere.infra.exception.ShardingSphereException; import org.apache.shardingsphere.infra.util.exception.ShardingSphereInsideException; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; import org.apache.shardingsphere.proxy.backend.handler.distsql.ral.common.exception.DistSQLException; import org.apache.shardingsphere.sql.parser.exception.SQLParsingException; import org.junit.Test; diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/admin/initdb/MySQLComInitDbExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/admin/initdb/MySQLComInitDbExecutor.java index f28ed962c713a..c6cb2834cff3e 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/admin/initdb/MySQLComInitDbExecutor.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/admin/initdb/MySQLComInitDbExecutor.java @@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.executor.check.SQLCheckEngine; import org.apache.shardingsphere.infra.rule.ShardingSphereRule; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; import org.apache.shardingsphere.proxy.frontend.command.executor.CommandExecutor; import org.apache.shardingsphere.proxy.frontend.mysql.command.ServerStatusFlagCalculator; diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactory.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactory.java index 3e586e0bbe1ee..5adf24844d56c 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactory.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactory.java @@ -21,9 +21,10 @@ import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.apache.shardingsphere.db.protocol.mysql.packet.generic.MySQLErrPacket; -import org.apache.shardingsphere.error.SQLExceptionHandler; +import org.apache.shardingsphere.error.exception.SQLDialectException; +import org.apache.shardingsphere.error.mapper.SQLDialectExceptionMapperFactory; import org.apache.shardingsphere.error.mysql.code.MySQLVendorError; -import org.apache.shardingsphere.infra.util.exception.ShardingSphereInsideException; +import org.apache.shardingsphere.infra.util.exception.sql.ShardingSphereSQLException; import org.apache.shardingsphere.infra.util.exception.sql.UnknownSQLException; import org.apache.shardingsphere.proxy.backend.handler.distsql.ral.common.exception.DistSQLException; import org.apache.shardingsphere.proxy.backend.handler.distsql.ral.common.exception.DistSQLVendorError; @@ -50,8 +51,12 @@ public static MySQLErrPacket newInstance(final Exception cause) { return null == sqlException.getSQLState() ? new MySQLErrPacket(1, MySQLVendorError.ER_INTERNAL_ERROR, getErrorMessage(sqlException)) : new MySQLErrPacket(1, sqlException.getErrorCode(), sqlException.getSQLState(), sqlException.getMessage()); } - if (cause instanceof ShardingSphereInsideException) { - SQLException sqlException = SQLExceptionHandler.convert("MySQL", (ShardingSphereInsideException) cause); + if (cause instanceof SQLDialectException) { + SQLException sqlException = SQLDialectExceptionMapperFactory.getInstance("MySQL").convert((SQLDialectException) cause); + return new MySQLErrPacket(1, sqlException.getErrorCode(), sqlException.getSQLState(), sqlException.getMessage()); + } + if (cause instanceof ShardingSphereSQLException) { + SQLException sqlException = ((ShardingSphereSQLException) cause).toSQLException(); return new MySQLErrPacket(1, sqlException.getErrorCode(), sqlException.getSQLState(), sqlException.getMessage()); } if (cause instanceof DistSQLException) { diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java index 3854dd8312e4a..15893032e32d0 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java @@ -20,17 +20,17 @@ import org.apache.shardingsphere.db.protocol.mysql.packet.generic.MySQLErrPacket; import org.apache.shardingsphere.infra.config.exception.ShardingSphereConfigurationException; import org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException; -import org.apache.shardingsphere.error.dialect.syntax.database.NoDatabaseSelectedException; -import org.apache.shardingsphere.error.dialect.syntax.database.UnknownDatabaseException; +import org.apache.shardingsphere.error.exception.syntax.database.NoDatabaseSelectedException; +import org.apache.shardingsphere.error.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.proxy.frontend.exception.CircuitBreakException; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseCreateExistsException; -import org.apache.shardingsphere.error.dialect.syntax.database.DatabaseDropNotExistsException; -import org.apache.shardingsphere.error.dialect.transaction.TableModifyInTransactionException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseCreateExistsException; +import org.apache.shardingsphere.error.exception.syntax.database.DatabaseDropNotExistsException; +import org.apache.shardingsphere.error.exception.transaction.TableModifyInTransactionException; import org.apache.shardingsphere.proxy.backend.handler.distsql.ral.common.exception.UnsupportedVariableException; import org.apache.shardingsphere.proxy.frontend.exception.UnsupportedCommandException; import org.apache.shardingsphere.proxy.frontend.exception.UnsupportedPreparedStatementException; -import org.apache.shardingsphere.error.dialect.syntax.table.NoSuchTableException; -import org.apache.shardingsphere.error.dialect.syntax.table.TableExistsException; +import org.apache.shardingsphere.error.exception.syntax.table.NoSuchTableException; +import org.apache.shardingsphere.error.exception.syntax.table.TableExistsException; import org.apache.shardingsphere.sql.parser.exception.SQLParsingException; import org.junit.Test; diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java index 770c54cee6a2a..f4b6eb5a9eb84 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java @@ -21,7 +21,7 @@ import lombok.Getter; import org.apache.shardingsphere.db.protocol.opengauss.codec.OpenGaussPacketCodecEngine; import org.apache.shardingsphere.db.protocol.postgresql.constant.PostgreSQLServerInfo; -import org.apache.shardingsphere.error.dialect.transaction.InTransactionException; +import org.apache.shardingsphere.error.exception.transaction.InTransactionException; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; import org.apache.shardingsphere.proxy.frontend.context.FrontendContext; import org.apache.shardingsphere.proxy.frontend.opengauss.authentication.OpenGaussAuthenticationEngine; diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/err/OpenGaussErrorPacketFactory.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/err/OpenGaussErrorPacketFactory.java index 5a16a5a18c87b..bd45d220f140a 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/err/OpenGaussErrorPacketFactory.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/err/OpenGaussErrorPacketFactory.java @@ -23,9 +23,10 @@ import lombok.SneakyThrows; import org.apache.shardingsphere.db.protocol.opengauss.packet.command.generic.OpenGaussErrorResponsePacket; import org.apache.shardingsphere.db.protocol.postgresql.constant.PostgreSQLMessageSeverityLevel; -import org.apache.shardingsphere.error.SQLExceptionHandler; +import org.apache.shardingsphere.error.exception.SQLDialectException; +import org.apache.shardingsphere.error.mapper.SQLDialectExceptionMapperFactory; import org.apache.shardingsphere.error.postgresql.code.PostgreSQLVendorError; -import org.apache.shardingsphere.infra.util.exception.ShardingSphereInsideException; +import org.apache.shardingsphere.infra.util.exception.sql.ShardingSphereSQLException; import org.apache.shardingsphere.proxy.frontend.postgresql.authentication.exception.InvalidAuthorizationSpecificationException; import org.apache.shardingsphere.proxy.frontend.postgresql.authentication.exception.PostgreSQLAuthenticationException; import org.apache.shardingsphere.proxy.frontend.postgresql.authentication.exception.PostgreSQLProtocolViolationException; @@ -75,8 +76,11 @@ public static OpenGaussErrorResponsePacket newInstance(final Exception cause) { if (cause instanceof SQLException) { return createErrorResponsePacket((SQLException) cause); } - if (cause instanceof ShardingSphereInsideException) { - return createErrorResponsePacket(SQLExceptionHandler.convert("PostgreSQL", (ShardingSphereInsideException) cause)); + if (cause instanceof SQLDialectException) { + return createErrorResponsePacket(SQLDialectExceptionMapperFactory.getInstance("PostgreSQL").convert((SQLDialectException) cause)); + } + if (cause instanceof ShardingSphereSQLException) { + return createErrorResponsePacket(((ShardingSphereSQLException) cause).toSQLException()); } if (cause instanceof InvalidAuthorizationSpecificationException) { return new OpenGaussErrorResponsePacket(PostgreSQLMessageSeverityLevel.FATAL, PostgreSQLVendorError.INVALID_AUTHORIZATION_SPECIFICATION.getSqlState().getValue(), cause.getMessage()); diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java index 423a8adcb438f..294aadf2d3de6 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java @@ -22,7 +22,7 @@ import org.apache.shardingsphere.db.protocol.postgresql.codec.PostgreSQLPacketCodecEngine; import org.apache.shardingsphere.db.protocol.postgresql.constant.PostgreSQLServerInfo; import org.apache.shardingsphere.db.protocol.postgresql.packet.PostgreSQLPacket; -import org.apache.shardingsphere.error.dialect.transaction.InTransactionException; +import org.apache.shardingsphere.error.exception.transaction.InTransactionException; import org.apache.shardingsphere.proxy.backend.session.ConnectionSession; import org.apache.shardingsphere.proxy.frontend.authentication.AuthenticationEngine; import org.apache.shardingsphere.proxy.frontend.command.CommandExecuteEngine; diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrPacketFactory.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrPacketFactory.java index 502fa7749c1a6..b6b0c15a69006 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrPacketFactory.java +++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrPacketFactory.java @@ -22,9 +22,10 @@ import lombok.NoArgsConstructor; import org.apache.shardingsphere.db.protocol.postgresql.constant.PostgreSQLMessageSeverityLevel; import org.apache.shardingsphere.db.protocol.postgresql.packet.generic.PostgreSQLErrorResponsePacket; -import org.apache.shardingsphere.error.SQLExceptionHandler; +import org.apache.shardingsphere.error.exception.SQLDialectException; +import org.apache.shardingsphere.error.mapper.SQLDialectExceptionMapperFactory; import org.apache.shardingsphere.error.postgresql.code.PostgreSQLVendorError; -import org.apache.shardingsphere.infra.util.exception.ShardingSphereInsideException; +import org.apache.shardingsphere.infra.util.exception.sql.ShardingSphereSQLException; import org.apache.shardingsphere.proxy.frontend.postgresql.authentication.exception.InvalidAuthorizationSpecificationException; import org.apache.shardingsphere.proxy.frontend.postgresql.authentication.exception.PostgreSQLAuthenticationException; import org.apache.shardingsphere.proxy.frontend.postgresql.authentication.exception.PostgreSQLProtocolViolationException; @@ -49,8 +50,11 @@ public static PostgreSQLErrorResponsePacket newInstance(final Exception cause) { if (cause instanceof PSQLException && null != ((PSQLException) cause).getServerErrorMessage()) { return createErrorResponsePacket(((PSQLException) cause).getServerErrorMessage()); } - if (cause instanceof ShardingSphereInsideException) { - return createErrorResponsePacket(SQLExceptionHandler.convert("PostgreSQL", (ShardingSphereInsideException) cause)); + if (cause instanceof SQLDialectException) { + return createErrorResponsePacket(SQLDialectExceptionMapperFactory.getInstance("PostgreSQL").convert((SQLDialectException) cause)); + } + if (cause instanceof ShardingSphereSQLException) { + return createErrorResponsePacket(((ShardingSphereSQLException) cause).toSQLException()); } if (cause instanceof SQLException) { return createErrorResponsePacket((SQLException) cause); diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java index 07d2a21363a01..42a62913ed061 100644 --- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java +++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java @@ -20,7 +20,7 @@ import com.google.common.base.Splitter; import lombok.SneakyThrows; import org.apache.shardingsphere.infra.datanode.DataNode; -import org.apache.shardingsphere.error.dialect.syntax.table.NoSuchTableException; +import org.apache.shardingsphere.error.exception.syntax.table.NoSuchTableException; import org.apache.shardingsphere.infra.util.expr.InlineExpressionParser; import org.apache.shardingsphere.test.integration.cases.dataset.metadata.DataSetColumn; import org.apache.shardingsphere.test.integration.cases.dataset.metadata.DataSetIndex; diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java index b843855a3e510..ad842f6966a87 100644 --- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java +++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java @@ -23,7 +23,7 @@ import org.apache.shardingsphere.integration.transaction.engine.base.BaseTransactionITCase; import org.apache.shardingsphere.integration.transaction.engine.base.TransactionTestCase; import org.apache.shardingsphere.integration.transaction.engine.constants.TransactionTestConstants; -import org.apache.shardingsphere.error.dialect.transaction.TableModifyInTransactionException; +import org.apache.shardingsphere.error.exception.transaction.TableModifyInTransactionException; import org.apache.shardingsphere.transaction.core.TransactionType; import javax.sql.DataSource;