public static String getExceptionMessageHistory(Throwable e) {
        String messages = "";

        String message = e.getMessage();
        if(message != null) {
            messages += message;
        }
        while((e = e.getCause()) != null) {
            message = e.getMessage();
            if(message != null) {
                messages += " <- " + message;
            }
        }

        return messages;
    }
Iterates a hierarchy of exceptions and combines their messages. Useful for compact
error representation to the user during debugging/development.
MediaPlayerDemo/src/main/java/net/protyposis/android/mediaplayerdemo/Utils.java