def METHOD_NAME(from_, to, msg=None):
    exc = None
    try:
        yield None
    except from_ as e:
        exc = e
    if exc:
        info = "%s: %s" % (exc.__class__.__name__, str(exc))
        if msg:
            info = "%s: %s" % (msg, info)
        raise to(info)