You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/10/15 15:12:37 UTC

[GitHub] [phoenix] shahrs87 commented on a change in pull request #919: PHOENIX-6185 : Propagate info available in SQLExceptionInfo to SQLTimeoutException

shahrs87 commented on a change in pull request #919:
URL: https://github.com/apache/phoenix/pull/919#discussion_r505624689



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
##########
@@ -453,8 +453,13 @@ public SQLException newException(SQLExceptionInfo info) {
     OPERATION_TIMED_OUT(6000, "TIM01", "Operation timed out.", new Factory() {
         @Override
         public SQLException newException(SQLExceptionInfo info) {
-            return new SQLTimeoutException(OPERATION_TIMED_OUT.getMessage(),
-                    OPERATION_TIMED_OUT.getSQLState(), OPERATION_TIMED_OUT.getErrorCode());
+            final String reason =
+                (info.getMessage() != null ? info.getMessage() : "")

Review comment:
       > info.getMessage() != null ? info.getMessage() : ""
   
   In else block, can we use OPERATION_TIMED_OUT.getMessage(). Atleast we will know it was operation timed out.
   




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

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