spring-framework / org.springframework.core / NestedCheckedException / getMostSpecificCause

getMostSpecificCause

open fun getMostSpecificCause(): Throwable

Retrieve the most specific cause of this exception, that is, either the innermost cause (root cause) or this exception itself.

Differs from #getRootCause() in that it falls back to the present exception if there is no root cause.

Return
the most specific cause (never null)

Since
2.0.3