Class ThrowableUtils


  • public class ThrowableUtils
    extends Object
    Things you wish Throwable or some logging package would do for you.
    Author:
    mwood
    • Method Detail

      • formatCauseChain

        public static String formatCauseChain​(Throwable throwable)
        Trace a chain of Throwables showing only causes. Less voluminous than a stack trace. Useful if you just want to know what caused third-party code to return an uninformative exception message.
        Parameters:
        throwable - the exception or whatever.
        Returns:
        list of messages from each Throwable in the chain, separated by '\n'.