Throwable initCause() method in Java with Examples
The initCause() method of Throwable class is used to initialize the cause of this Throwable with the specified cause passed as a parameter to initCause(). Actually, the cause is throwable that caused this throwable Object to get thrown when an exception occurs. This method can be called only once. G