lanchengx commented on a change in pull request #12638:
URL: https://github.com/apache/shardingsphere/pull/12638#discussion_r715267495



##########
File path: 
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactory.java
##########
@@ -116,6 +116,9 @@ public static MySQLErrPacket newInstance(final Exception 
cause) {
         if (cause instanceof ScalingJobNotFoundException) {
             return new MySQLErrPacket(1, 
CommonErrorCode.SCALING_JOB_NOT_EXIST, ((ScalingJobNotFoundException) 
cause).getJobId());
         }
+        if (cause instanceof RuntimeException) {
+            return new MySQLErrPacket(1, CommonErrorCode.RUNTIME_EXCEPTION, 
cause.getMessage());
+        }
         return new MySQLErrPacket(1, CommonErrorCode.UNKNOWN_EXCEPTION, 
cause.getMessage());

Review comment:
       There is no difference between the two, except that the display on the 
client side has changed from `unknown exception` to `runtime exception`.
   It mainly solves the `unknown exception` that appeared in the last poc.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to