ExceptionInInitializerError类重点
抛出ExceptionInInitializerError错误表示静态初始值设定项中发生意外异常。即计算静态初始值设定项或静态变量初始值设定项期间发生异常。
ExceptionInInitializerError类源码
package java.lang; public class ExceptionInInitializerError extends linkageError { private static final long serialVersionUID = 1521711792217232256L; private Throwable exception; public ExceptionInInitializerError() { initCause(null); // Disallow subsequent initCause } public ExceptionInInitializerError(Throwable thrown) { initCause(null); // Disallow subsequent initCause this.exception = thrown; } public ExceptionInInitializerError(String s) { super(s); initCause(null); // Disallow subsequent initCause } public Throwable getException() { return exception; } public Throwable getCause() { return exception; } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)