You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "TeslaCN (via GitHub)" <gi...@apache.org> on 2023/04/11 04:42:30 UTC

[GitHub] [shardingsphere] TeslaCN commented on a diff in pull request #25092: replace PSQLException with PostgreSQLException (#22544)

TeslaCN commented on code in PR #25092:
URL: https://github.com/apache/shardingsphere/pull/25092#discussion_r1162292973


##########
proxy/frontend/type/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/err/PostgreSQLErrPacketFactory.java:
##########
@@ -65,8 +71,8 @@ private static PostgreSQLErrorResponsePacket createErrorResponsePacket(final Ser
     
     @SuppressWarnings("ConstantConditions")
     private static PostgreSQLErrorResponsePacket createErrorResponsePacket(final SQLException cause) {
-        if (cause instanceof PSQLException && null != ((PSQLException) cause).getServerErrorMessage()) {

Review Comment:
   The `cause` could be `PSQLException`, so we need to keep the origin logic here and add a new branch to handle `PostgreSQLException`.



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