Discuss / Java / No exception of type IllegalArgumentException can be thrown是什么原因

No exception of type IllegalArgumentException can be thrown是什么原因

Topic source

欣欣欣语

#1 Created at ... [Delete] [Delete and Lock User]

static void process1() {

        try {

            process2();

        } catch (NullPointerException e) {

            throw new IllegalArgumentException(e);//这里报错是什么原因,看不懂

        }

    }

复制出来的代码,在本地报这个是什么原因,No exception of type IllegalArgumentException can be thrown; an exception type must be a subclass of Throwable


  • 1

Reply