lhyundeadsoul commented on code in PR #20677:
URL: https://github.com/apache/shardingsphere/pull/20677#discussion_r959528313


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/exception/SQLParsingException.java:
##########
@@ -26,8 +26,12 @@
 public final class SQLParsingException extends ShardingSphereSQLException {
     
     private static final long serialVersionUID = -6408790652103666096L;
-    
+
     public SQLParsingException(final String sql) {
         super(XOpenSQLState.SYNTAX_ERROR, 11000, "You have an error in your 
SQL syntax: %s", sql);
     }
+
+    public SQLParsingException(final String sql, final Exception cause) {
+        super(cause, XOpenSQLState.SYNTAX_ERROR.getValue(), 11000, "You have 
an error in your SQL syntax: %s, Error message: %s", sql, cause.getMessage());

Review Comment:
   > Do you think `You have an error in your SQL syntax: %s, error message: %s` 
is better?
   
   Do you mean Error -> error? 
   done :)



-- 
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