You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/04 09:45:55 UTC

[GitHub] [shardingsphere] TeslaCN commented on a change in pull request #13463: Improve error message for SQLException.

TeslaCN commented on a change in pull request #13463:
URL: https://github.com/apache/shardingsphere/pull/13463#discussion_r742676192



##########
File path: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactory.java
##########
@@ -125,4 +126,11 @@ public static MySQLErrPacket newInstance(final Exception cause) {
         }
         return new MySQLErrPacket(1, CommonErrorCode.UNKNOWN_EXCEPTION, cause.getMessage());
     }
+    
+    private static String getErrorMessage(final SQLException cause) {
+        if (null != cause.getNextException() && StringUtils.isBlank(cause.getMessage())) {
+            return cause.getNextException().getMessage();

Review comment:
       What if the next is not the tail of the link?




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org