Skip to content
Snippets Groups Projects
Commit 00d69db0 authored by felmer's avatar felmer
Browse files

LMS-1747 method getEndOfChain added

SVN: 17821
parent f9712c93
No related branches found
No related tags found
No related merge requests found
......@@ -151,4 +151,13 @@ public final class ExceptionUtils
}
return null;
}
/**
* Returns the last {@link Throwable} of a chain of throwables.
*/
public static Throwable getEndOfChain(Throwable throwable)
{
Throwable cause = throwable.getCause();
return cause == null ? throwable : getEndOfChain(cause);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment