tuichenchuxin commented on code in PR #20677:
URL: https://github.com/apache/shardingsphere/pull/20677#discussion_r959625320
##########
shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/ShardingSphereSQLException.java:
##########
@@ -40,6 +40,11 @@ public ShardingSphereSQLException(final SQLState sqlState,
final int vendorCode,
}
public ShardingSphereSQLException(final String sqlState, final int
vendorCode, final String reason, final Object... messageArguments) {
+ this(null, sqlState, vendorCode, reason, messageArguments);
Review Comment:
There is no reason to set cause to null. May be not need to call super().
##########
shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/ShardingSphereSQLException.java:
##########
@@ -40,6 +40,11 @@ public ShardingSphereSQLException(final SQLState sqlState,
final int vendorCode,
}
public ShardingSphereSQLException(final String sqlState, final int
vendorCode, final String reason, final Object... messageArguments) {
+ this(null, sqlState, vendorCode, reason, messageArguments);
+ }
+
+ public ShardingSphereSQLException(final Exception cause, final String
sqlState, final int vendorCode, final String reason, final Object...
messageArguments) {
+ super(cause);
Review Comment:
It's better to set Exception as the last parameter.
--
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]