This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new b34b67628ad Revise error code on AlgorithmNotFoundOnColumnException 
(#30560)
b34b67628ad is described below

commit b34b67628ad0e151bb2048ddc69bc19ae355e303
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Mar 20 17:03:06 2024 +0800

    Revise error code on AlgorithmNotFoundOnColumnException (#30560)
---
 docs/document/content/user-manual/error-code/sql-error-code.cn.md      | 3 ++-
 docs/document/content/user-manual/error-code/sql-error-code.en.md      | 3 ++-
 .../infra/algorithm/core/exception/AlgorithmExecuteException.java      | 2 +-
 .../algorithm/core/exception/AlgorithmNotFoundOnColumnException.java   | 2 +-
 .../algorithm/core/exception/AlgorithmNotFoundOnTableException.java    | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/docs/document/content/user-manual/error-code/sql-error-code.cn.md 
b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
index 346177fd439..11cd4a5b43c 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.cn.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
@@ -24,7 +24,8 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
 | 42000     | 10010       | Rule does not exist.                               
                            |
 | 44000     | 10011       | Algorithm '%s.'%s' initialization failed, reason 
is: %s.                       |
 | 44000     | 10012       | Can not find '%s' algorithm on table '%s'.         
                            |
-| 44000     | 10013       | Algorithm '%s.%s' execute failed, reason is: %s.   
                            |
+| 44000     | 10013       | Can not find '%s' algorithm '%s' on table.column 
'%s'.'%s'.                    |
+| HY000     | 10015       | Algorithm '%s.%s' execute failed, reason is: %s.   
                            |
 | 42S02     | 10020       | Schema \`%s\` does not exist.                      
                            |
 | 42S02     | 10021       | Single table \`%s\` does not exist.                
                            |
 | HY000     | 10022       | Can not load table with database name \`%s\` and 
data source name \`%s\`.      |
diff --git a/docs/document/content/user-manual/error-code/sql-error-code.en.md 
b/docs/document/content/user-manual/error-code/sql-error-code.en.md
index dc06b30e7fe..76228bf83ff 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.en.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.en.md
@@ -24,7 +24,8 @@ SQL error codes provide by standard `SQL State`, `Vendor 
Code` and `Reason`, whi
 | 42000     | 10010       | Rule does not exist.                               
                            |
 | 44000     | 10011       | Algorithm '%s.'%s' initialization failed, reason 
is: %s.                       |
 | 44000     | 10012       | Can not find '%s' algorithm on table '%s'.         
                            |
-| 44000     | 10013       | Algorithm '%s.%s' execute failed, reason is: %s.   
                            |
+| 44000     | 10013       | Can not find '%s' algorithm '%s' on table.column 
'%s'.'%s'.                    |
+| HY000     | 10015       | Algorithm '%s.%s' execute failed, reason is: %s.   
                            |
 | 42S02     | 10020       | Schema \`%s\` does not exist.                      
                            |
 | 42S02     | 10021       | Single table \`%s\` does not exist.                
                            |
 | HY000     | 10022       | Can not load table with database name \`%s\` and 
data source name \`%s\`.      |
diff --git 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmExecuteException.java
 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmExecuteException.java
index f2e0abd85a8..9af51b570d1 100644
--- 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmExecuteException.java
+++ 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmExecuteException.java
@@ -29,7 +29,7 @@ public final class AlgorithmExecuteException extends 
MetaDataSQLException {
     private static final long serialVersionUID = -9099514178650043282L;
     
     public AlgorithmExecuteException(final ShardingSphereAlgorithm algorithm, 
final String reason, final Object... args) {
-        super(XOpenSQLState.GENERAL_ERROR, 13, "Algorithm '%s.%s' execute 
failed, reason is: %s.",
+        super(XOpenSQLState.GENERAL_ERROR, 15, "Algorithm '%s.%s' execute 
failed, reason is: %s.",
                 algorithm.getClass().getSuperclass().getSimpleName(), 
algorithm.getType(), String.format(reason, args));
     }
 }
diff --git 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnColumnException.java
 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnColumnException.java
index 0a746b41f7a..4f19423d299 100644
--- 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnColumnException.java
+++ 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnColumnException.java
@@ -28,6 +28,6 @@ public final class AlgorithmNotFoundOnColumnException extends 
MetaDataSQLExcepti
     private static final long serialVersionUID = -4570489906443880879L;
     
     public AlgorithmNotFoundOnColumnException(final String algorithmType, 
final String algorithmName, final String tableName, final String columnName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 12, "Can not find '%s' 
algorithm '%s' on table.column '%s'.%s", algorithmType, algorithmName, 
tableName, columnName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 13, "Can not find '%s' 
algorithm '%s' on table.column '%s'.'%s'.", algorithmType, algorithmName, 
tableName, columnName);
     }
 }
diff --git 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnTableException.java
 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnTableException.java
index c9a61aaa7a1..f35329c21de 100644
--- 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnTableException.java
+++ 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/AlgorithmNotFoundOnTableException.java
@@ -28,6 +28,6 @@ public final class AlgorithmNotFoundOnTableException extends 
MetaDataSQLExceptio
     private static final long serialVersionUID = -6334833729231404326L;
     
     public AlgorithmNotFoundOnTableException(final String algorithmType, final 
String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 12, "Can not find '%s' 
algorithm on table '%s'.", algorithmType, tableName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 13, "Can not find '%s' 
algorithm on table '%s'.", algorithmType, tableName);
     }
 }

Reply via email to