Replace a checked exception with a runtime exception?

后端 未结 6 1488
情话喂你
情话喂你 2021-02-06 04:51

Given that I basically want to eliminate checked exception usage and transform them to runtime exceptions, I would normally be doing something like this:

try {
          


        
6条回答
  •  自闭症患者
    2021-02-06 05:04

    Follow up from my comment. Here's an article that has to throw some light on the issue. It uses sun.misc.Unsafe to rethrow exceptions without wrapping them.

提交回复
热议问题