def lookup_label(label, symtable):
    """Label lookup with user-friendly exception."""
    if label not in symtable:
        raise Exception("Undefined label '%s'" % label)
    return symtable[label]