You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/06/06 08:54:59 UTC

[GitHub] [rocketmq] huskyui opened a new issue, #4421: 有段try-catch代码没理解

huskyui opened a new issue, #4421:
URL: https://github.com/apache/rocketmq/issues/4421

   ```
       public void deleteTopic(final String topic) {
           try {
               try {
                   this.lock.writeLock().lockInterruptibly();
                   this.topicQueueTable.remove(topic);
               } finally {
                   this.lock.writeLock().unlock();
               }
           } catch (Exception e) {
               log.error("deleteTopic Exception", e);
           }
       }
   ```
   最里面是try finally我理解,外面这一层的try catch我不理解它的意义是啥
   


-- 
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: dev-unsubscribe@rocketmq.apache.org.apache.org

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


[GitHub] [rocketmq] hzh0425 commented on issue #4421: 有段try-catch代码没理解

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on issue #4421:
URL: https://github.com/apache/rocketmq/issues/4421#issuecomment-1147350054

   You can create a pr to optimize it


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] huskyui commented on issue #4421: Ugly code of try catch

Posted by GitBox <gi...@apache.org>.
huskyui commented on issue #4421:
URL: https://github.com/apache/rocketmq/issues/4421#issuecomment-1151206342

   i will create a pr to fix it in this weekend.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] huskyui commented on issue #4421: Ugly code of try catch

Posted by GitBox <gi...@apache.org>.
huskyui commented on issue #4421:
URL: https://github.com/apache/rocketmq/issues/4421#issuecomment-1149857619

   > You can create a pr to optimize it
   
   了解


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] huskyui closed issue #4421: Ugly code of try catch

Posted by GitBox <gi...@apache.org>.
huskyui closed issue #4421: Ugly code of try catch
URL: https://github.com/apache/rocketmq/issues/4421


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on issue #4421: Ugly code of try catch

Posted by GitBox <gi...@apache.org>.
lizhanhui commented on issue #4421:
URL: https://github.com/apache/rocketmq/issues/4421#issuecomment-1150602289

   Is there any follow-up PR to fix this issue?


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] huskyui closed issue #4421: Ugly code of try catch

Posted by GitBox <gi...@apache.org>.
huskyui closed issue #4421: Ugly code of try catch
URL: https://github.com/apache/rocketmq/issues/4421


-- 
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: dev-unsubscribe@rocketmq.apache.org

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