Java exception handling

后端 未结 7 1259
無奈伤痛
無奈伤痛 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
    }
    
    0 讨论(0)
提交回复
热议问题