def _call_or_raise(exc, func, *args, **kw):
    """
    Call func(*args, **kw) and catch any exceptions, raising exc instead.

    This exists to avoid a bunch of boilerplate try/except blocks in
    parse_absolute_time()
    """
    try:
        return func(*args, **kw)
    except:
        raise exc
