strongduanmu commented on code in PR #20677:
URL: https://github.com/apache/shardingsphere/pull/20677#discussion_r960159067
##########
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:
> > Please update the error code document at the same time.
>
> I am new to this. Can you tell me where is the error code document?
@lhyundeadsoul You can refer this
document——https://shardingsphere.apache.org/document/current/cn/user-manual/error-code/sql-error-code/.
--
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]