/** * From the given throwable or its cause, or cause's cause, etc., get the first one that has a non-empty message, and return * that message. * * @param t * t * @return the first non-empty message string, or null. */ public static String getFirstMeaningfulMessage(Throwable t) { if (t == null) return null; String m = t.getMessage(); if (m != null && !m.isEmpty()) { return m; } return getFirstMeaningfulMessage(t.getCause()); }
/** * From the given throwable or its cause, or cause's cause, etc., get the first one that has a non-empty message, and return * that message. * * @param t * t * @return the first non-empty message string, or null. */ public static String getFirstMeaningfulMessage(Throwable t) { if (t == null) return null; String m = t.getMessage(); if (m != null && !m.isEmpty()) { return m; } return getFirstMeaningfulMessage(t.getCause()); }
+ MaryUtils.getFirstMeaningfulMessage(e), e);
+ MaryUtils.getFirstMeaningfulMessage(e), e);
+ MaryUtils.getFirstMeaningfulMessage(e), e);