def _display_error(normalized_data, stream):
    """
    print error message from docker-py stream and raise Exception.
    {
        u'message': u"Error getting container 981c3e17bfc6138d1985c0c8f5616e9064e56559e817646ad38211a456d6bcf2 from driver
        devicemapper: Error mounting '/dev/mapper/docker-8:3-34393696-981c3e17bfc6138d1985c0c8f5616e9064e56559e817646ad38211a456d6bcf2'
        on '/data/docker/devicemapper/mnt/981c3e17bfc6138d1985c0c8f5616e9064e56559e817646ad38211a456d6bcf2': no such file
        or directory"
    }

    """
    # TODO: need to revisit this later.
    error = normalized_data['error']
    if 'error_detail' in normalized_data:
        stream.write("exit code: {0}\n".format(normalized_data['error_detail'].get('code'),
                                               'There was no exit code provided'))

        stream.write(normalized_data['error_detail'].get('message', 'There were no message details provided.'))

    raise DockerStreamException(error)