'Set the error type and code based on the given error
condition value.
Arguments:
value -- The new error condition.'

def set_condition(self, value):

    self.parent().set_condition(value)
    error_data = self.error_map.get(value, None)
    if (error_data is not None):
        if (error_data[0] is not None):
            self.parent()['type'] = error_data[0]
        self.parent()['code'] = error_data[1]
