rdr-py / code / exec_node.py
exec_node.py
Raw
"""
*******************************************************
Owner: Ashutosh Jha
For: APPCAIR BITS Pilani Goa Campus, Reflexis Systems
Function Name: exec_node
Takes node and current row and current instance number
z as input. Executes the data in the node.
*******************************************************
"""
def exec_node(node,cur_row,z):
    #print(node.belongs)
    try:
        exec(node.data)
    except (NameError,ZeroDivisionError) as e:
        if(e == NameError):
            print("Log:Encountered a nan value")
        else:
            print("Encountered a zero value in your expression divisor.")