标签:hat exception ica cat except 理解 有一个 throwable 等于
这个在构造函数里面竟然有一个Throwable,感觉有些奇怪。
1.
Throwable cause 这里cause要传一个Throwable的子类异常进去么?
是引起这个异常的异常,如果这个值是空值,那么这个异常就是源头;如果这个值等于自己,那么这个异常还没被初始化。
/**
* The throwable that caused this throwable to get thrown, or null if this
* throwable was not caused by another throwable, or if the causative
* throwable is unknown. If this field is equal to this throwable itself,
* it indicates that the cause of this throwable has not yet been
* initialized.
*
* @serial
* @since 1.4
*/
异常类Exception(String message, Throwable cause)中的cause理解
标签:hat exception ica cat except 理解 有一个 throwable 等于
原文地址:http://www.cnblogs.com/juncaoit/p/7641050.html