Java examples for java.lang:Throwable
Throwable root Cause
//package com.java2s; public class Main { public static Throwable getRootCause(Throwable ex) { Throwable rootCause = null; Throwable cause = ex.getCause(); while (cause != null && cause != rootCause) { rootCause = cause;// ww w .j a v a2 s . c o m cause = cause.getCause(); } return rootCause; } }