'Get images, wrapping in exception if necessary.'

def _get_images(self, context, filters, **params):

    if (context.is_admin and (params.get('is_public') is True)):
        params['admin_as_user'] = True
        del params['is_public']
    try:
        return self.db_api.image_get_all(context, filters=filters, v1_mode=True, **params)
    except exception.ImageNotFound:
        LOG.warn((_LW('Invalid    marker.    Image    %(id)s    could    not    be    found.') % {'id': params.get('marker')}))
        msg = _('Invalid    marker.    Image    could    not    be    found.')
        raise exc.HTTPBadRequest(explanation=msg)
    except exception.Forbidden:
        LOG.warn((_LW("Access    denied    to    image    %(id)s    but    returning    'not    found'") % {'id': params.get('marker')}))
        msg = _('Invalid    marker.    Image    could    not    be    found.')
        raise exc.HTTPBadRequest(explanation=msg)
    except Exception:
        LOG.exception(_LE('Unable    to    get    images'))
        raise
