What is the best way to catch an IllegalArgumentException

后端 未结 4 2615
星月不相逢
星月不相逢 2021-02-20 11:02

When would be the best use of this type of exception and is it handeled properly if caught in a catch like so?

catch(Exception e)

Or does it ne

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-20 12:04

    It really depends on the case at hand, either is correct in itself. Without narrowing down the scope of the question, it's a bit hard to give a "best use" example.

提交回复
热议问题