Multiple try-catch or one?

前端 未结 11 1749

Normally, I\'d do this:

try
{
    code

    code that might throw an anticipated exception you want to handle

    code

    code that might throw an anticip         


        
11条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 09:47

    If I could choose the second I would probably separate this into two functions.

提交回复
热议问题