Iterating over inner exceptions for logging.