Is it good to catch a more general type of Exception?

后端 未结 10 1708
無奈伤痛
無奈伤痛 2021-01-06 01:22

If we are to catch specific forms of IOException, or any other kind as a matter of fact, and we only try and catch a couple (and define definitive outputs for t

10条回答
  •  北海茫月
    2021-01-06 02:20

    Generally, you only want to catch and handle exceptions you can do something with at a low level. Then at a higher level, catch any unhandled exceptions system wide, so you can record errors that occurred.

提交回复
热议问题