Exception Handling Question

后端 未结 8 685
谎友^
谎友^ 2020-12-13 02:30

I have a question regarding exception handling. Consider following Java code snippet.

        try{
            //code
        }catch(SubSubException subsube         


        
8条回答
  •  一个人的身影
    2020-12-13 02:45

    hmm, why do you even have to do the second approach? remember this, unless other options are better in terms of performance, readability, etc, you should stick with the conventions. catch statement were originally designed so they handle classification of exception types own their own so use them as is... just a thought!...

提交回复
热议问题