public Throwable getRootCause ( ) { Throwable rootCause = null ; Throwable nextCause = getCause ( ) ; while ( nextCause != null && ! nextCause . equals ( rootCause ) ) { rootCause = nextCause ; nextCause = nextCause . getCause ( ) ; } return rootCause ; }
Retrieves the ultimate root cause for this exception or null