Gets setting or throws an IllegalArgumentException if not found

@param name of setting to search for
@return found value

@throws IllegalArgumentException in case setting is not present
429322
private Object get(String name) {

		Object value = find(name);
		if (value == null) {
			throw new IllegalArgumentException("Setting: '" + name + "', not found!");
		}

		return value;
	}
337036
SimonConfiguration getConfig(String name) {
		SimonState state = null;

		for (SimonPattern pattern : configs.keySet()) {
			if (pattern.matches(name)) {
				SimonConfiguration config = configs.get(pattern);
				if (config.getState() != null) {
					state = config.getState();
				}
			}
		}
		return new SimonConfiguration(state);
	}
1155282
@Override
    public Object getValue(String paramName) throws IllegalArgumentException {
        if (!hasValue(paramName)) {
            throw new IllegalArgumentException("Can't find criteria with name " + paramName);
        }
        if (LIMIT_NAME.equals(paramName)) {
            return limit;
        }
        if (OFFSET_NAME.equals(paramName)) {
            return offset;
        }
        return criterias.get(paramName).getValue();
    }
501155
public T lookup(String name) throws NamingException {
        T binding = super.get(name);
        if (binding != null) {
            return binding;
        }

        // Binding does not exist.  Check if any the contexts are bindings.
        String contextName = name;
        while (!(contextName = getContextName(contextName)).isEmpty()) {
            if (containsKey(contextName)) {
                throw new NotContextException(namespace + "/" + contextName);
            }
        }

        return null;
    }
1264998
public final <T> T getArgument(String name)
    {
        if (arguments == null)
        {
            throw new IllegalStateException("setArgs not called");
        }
        return (T) arguments.get(name);
    }
1209886
public String getProperty(String name) {
        BugProperty prop = lookupProperty(name);
        return prop != null ? prop.getValue() : null;
    }
1129800
@Override
    public <T> T get(String name, T defaultValue) {
        if (!containsKey(name)) {
            return defaultValue;
        }
        return get(name);
    }
740557
public static String getPropertyOrNull(String name) {
        try {
            return AccessController.doPrivileged(new SystemPropertyAction(name));
        } catch (SecurityException ex) {
            LOG.log(Level.FINE, "SecurityException raised getting property " + name, ex);
            return null;
        }
    }
1088164
def get_setting(key, **kwargs):
    
    has_default = 'default' in kwargs
    default_val = kwargs.get('default')

    try:
        if has_default:
            return getattr(settings, key, default_val)
        else:
            return getattr(settings, key)
    except Exception as e:
        raise ImproperlyConfigured(
            _('"{0}" setting has not been properly set. {1}').format(key, e)
        )
167397
@SuppressWarnings("unchecked")
  public String getString(String name) {
    return ((Value<String>) getValue(name)).get();
  }
964320
protected final Accessor getAccessor (String name)
    {
        int low = 0, high = _accessors.length-1;
        while (low <= high) {
            int mid = (low + high) >> 1;
            Accessor midVal = _accessors[mid];
            int cmp = midVal.name.compareTo(name);
            if (cmp < 0) {
                low = mid + 1;
            } else if (cmp > 0) {
                high = mid - 1;
            } else {
                return midVal; // key found
            }
        }
        throw new IllegalArgumentException("No such field " + getClass().getName() + "." + name);
    }
211521
private String getMandatory(String name) {
        if (!config.containsKey(name)) {
            throw new ProbeConfigurationException(name + " parameter is missing.");
        } else {
            return config.getString(name);
        }

    }
616137
public static policypatset get(nitro_service service, String name) throws Exception{
		policypatset obj = new policypatset();
		obj.set_name(name);
		policypatset response = (policypatset) obj.get_resource(service);
		return response;
	}
868415
public CommandOption<T> setting(String name) {

		Assert.notNullOrEmptyTrimmed(name, "Missing setting name");

		name = StringUtils.trim(name);
		String compare = StringUtils.sanitizeWhitespace(name);
		Assert.isTrue(name.equals(compare), "Setting name can not contain whitespace characters!");

		setting = name;
		return this;
	}
981271
public final Template getTemplate(final String name) {
        final Template template = this.templates.get(name);
        if (template != null) {
            this.accessAssertion.assertAccess("Configuration", this);
            template.assertAccessible(name);
        } else {
            throw new IllegalArgumentException(String.format("Template '%s' does not exist.  Options are: " +
                                                                     "%s", name, this.templates.keySet()));
        }
        return template;
    }
757600
@Nullable
  private String getProperty(final String name) {
    assert name != null;
    ensureConfigured();
    return evaluate(System.getProperty(name, props.getProperty(name)));
  }
573085
public ParameterValue getPathParameter(String name) {
        if (!getPathParameters().containsKey(name)) {
            return buildParameterValue();
        }

        return getPathParameters().get(name);
    }