Java exception handling

后端 未结 7 1269
無奈伤痛
無奈伤痛 2020-12-02 00:37

How do I use exceptions and exception handling to make my program continue even if an exception occurs while processing certain files in a set of files?

I want my pr

7条回答
  •  眼角桃花
    2020-12-02 01:17

    just catch the excpetion it may throw and do nothing with it; eat it as people say :) But at least log it!

    Very concise example:

    try {
       your code...
    } catch (Exception e) {
       log here
    }
    

提交回复
热议问题