我已经尝试在普遍的情况下调用此异常,默认情况下在我的应用程序中调用:
String causeClass = e.getCause().getClass().getName();
但我得到了NullPointerException.
NullPointerException
有没有一种安全的方法来查找原因并获取原因异常的类名?
java exception-handling nullpointerexception
exception-handling ×1
java ×1
nullpointerexception ×1