Used to attach attributes to the error object in the constructor.
167113
function attachProps(context, target) {
  if (isObject(target)) {
    var keys = inheritedKeys(target);
    for (var i = 0, l = keys.length; i < l; ++i) {
      context[keys[i]] = clone(target[keys[i]]);
    }
  }
}
295958
protected function setErrorClassAttribute()
    {
        if ($this->hasArgument('class')) {
            $cssClass = $this->arguments['class'] . ' ';
        } else {
            $cssClass = '';
        }
        $mappingResultsForProperty = $this->getMappingResultsForProperty();
        if ($mappingResultsForProperty->hasErrors()) {
            if ($this->hasArgument('errorClass')) {
                $cssClass .= $this->arguments['errorClass'];
            } else {
                $cssClass .= 'error';
            }
            $this->tag->addAttribute('class', $cssClass);
        }
    }
973795
private void validateAttributes() {
    if (content == null) {
      throw new NullContentException("RendererBuilder needs content to create Renderer instances");
    }

    if (parent == null) {
      throw new NullParentException("RendererBuilder needs a parent to inflate Renderer instances");
    }

    if (layoutInflater == null) {
      throw new NullLayoutInflaterException(
          "RendererBuilder needs a LayoutInflater to inflate Renderer instances");
    }
  }
853896
function DummyError() {
  var code = arguments[0]
    , args = Array.prototype.slice.call(arguments, 1)
    , msgi = (typeof args[0] === 'object') ? 1 : 0
  ;
  // Apply code to error message composed by parent class.
  args[msgi] = code + ', ' + args[msgi];
  // Construct parent.
  VError.apply(this, args);
  // Define DummyError specific attributes.
  this.name = 'DummyError';
  this.code = code || 'DEFAULT';
  this.errno = DUMMY_ERRNOS[this.code];
}
116508
function VError()
{
	var args, obj, parsed, cause, ctor, message, k;

	args = Array.prototype.slice.call(arguments, 0);

	/*
	 * This is a regrettable pattern, but JavaScript's built-in Error class
	 * is defined to work this way, so we allow the constructor to be called
	 * without "new".
	 */
	if (!(this instanceof VError)) {
		obj = Object.create(VError.prototype);
		VError.apply(obj, arguments);
		return (obj);
	}

	/*
	 * For convenience and backwards compatibility, we support several
	 * different calling forms.  Normalize them here.
	 */
	parsed = parseConstructorArguments({
	    'argv': args,
	    'strict': false
	});

	/*
	 * If we've been given a name, apply it now.
	 */
	if (parsed.options.name) {
		mod_assertplus.string(parsed.options.name,
		    'error\'s "name" must be a string');
		this.name = parsed.options.name;
	}

	/*
	 * For debugging, we keep track of the original short message (attached
	 * this Error particularly) separately from the complete message (which
	 * includes the messages of our cause chain).
	 */
	this.jse_shortmsg = parsed.shortmessage;
	message = parsed.shortmessage;

	/*
	 * If we've been given a cause, record a reference to it and update our
	 * message appropriately.
	 */
	cause = parsed.options.cause;
	if (cause) {
		mod_assertplus.ok(mod_isError(cause), 'cause is not an Error');
		this.jse_cause = cause;

		if (!parsed.options.skipCauseMessage) {
			message += ': ' + cause.message;
		}
	}

	/*
	 * If we've been given an object with properties, shallow-copy that
	 * here.  We don't want to use a deep copy in case there are non-plain
	 * objects here, but we don't want to use the original object in case
	 * the caller modifies it later.
	 */
	this.jse_info = {};
	if (parsed.options.info) {
		for (k in parsed.options.info) {
			this.jse_info[k] = parsed.options.info[k];
		}
	}

	this.message = message;
	Error.call(this, message);

	if (Error.captureStackTrace) {
		ctor = parsed.options.constructorOpt || this.constructor;
		Error.captureStackTrace(this, ctor);
	}

	return (this);
}
838594
public void addErrorsProperties(Map<String,Object> properties, Object errorsType)
    {
        try {
            Method method = errorsType.getClass().getMethod("getErrors", EMPTY_PARAMS);
            if (method != null)
            {
                Object value = method.invoke(errorsType, EMPTY_DATA);
                if (value instanceof List<?>)
                {
                    for (Object errorType : (List<?>)value)
                    {
                        method = errorType.getClass().getMethod("getShortText", EMPTY_PARAMS);
                        if (method != null)
                        {
                            value = method.invoke(errorType, EMPTY_DATA);
                            if (value instanceof String)
                                properties.put("Error", value);
                        }
                    }                
                }
            }
        } catch (SecurityException e) {
            e.printStackTrace();
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
831886
private void encodeAttributes(List attributes, PrintStream out,
                                  Indenter indenter) {
        Iterator it = attributes.iterator();
        while (it.hasNext()) {
            Attribute attr = (Attribute)(it.next());
            attr.encode(out, indenter);
        }
    }
727281
def add_attribute_value_initializer
      class << self
        def new(opts=nil)
          obj = super()
          obj.post_initialize
          obj.merge_attributes(opts) if opts
          obj
        end
      end
      logger.debug { "#{self} is extended with an optional {attribute=>value} constructor parameter." }
    end
1258940
private void buildAttributeValueObject(final String name) {
	attrval.name = name;
	attrval.quality = AttrQuality.ATTR_VALID;
	attrval.time = new TimeVal();
	attrval.r_dim = new AttributeDim();
	attrval.w_dim = new AttributeDim();
	attrval.r_dim.dim_x = 1;
	attrval.r_dim.dim_y = 0;
	attrval.w_dim.dim_x = 0;
	attrval.w_dim.dim_y = 0;
	try {
	    attrval.value = ApiUtil.get_orb().create_any();
	} catch (final DevFailed e) {
	}

	final long now = System.currentTimeMillis();
	attrval.time.tv_sec = (int) (now / 1000);
	attrval.time.tv_usec = (int) (now - attrval.time.tv_sec * 1000) * 1000;
	attrval.time.tv_nsec = 0;
	attrval.err_list = null;
    }
751917
function initCustomAttributes ( object ) {

		var geometry = object.geometry;
		var material = object.material;

		var nvertices = geometry.vertices.length;

		if ( material.attributes ) {

			if ( geometry.__webglCustomAttributesList === undefined ) {

				geometry.__webglCustomAttributesList = [];

			}

			for ( var name in material.attributes ) {

				var attribute = material.attributes[ name ];

				if ( ! attribute.__webglInitialized || attribute.createUniqueBuffers ) {

					attribute.__webglInitialized = true;

					var size = 1;   // "f" and "i"

					if ( attribute.type === 'v2' ) size = 2;
					else if ( attribute.type === 'v3' ) size = 3;
					else if ( attribute.type === 'v4' ) size = 4;
					else if ( attribute.type === 'c'  ) size = 3;

					attribute.size = size;

					attribute.array = new Float32Array( nvertices * size );

					attribute.buffer = _gl.createBuffer();
					attribute.buffer.belongsToAttribute = name;

					attribute.needsUpdate = true;

				}

				geometry.__webglCustomAttributesList.push( attribute );

			}

		}

	}
454777
function () {
                    if (this.$initialized) {
                        return;
                    }

                    var $ = this.$,
                        bindingCreator = this.$bindingCreator,
                        bindingAttributes = this.$bindingAttributes,
                        bindingDefinitions,
                        bindingAttribute,
                        value,
                        key;

                    // FIXME: resolve dependencies between bindings and loop in the correct order
                    // e.g. view="{{product.view}}" needs product

                    // Resolve bindings and events
                    for (key in bindingAttributes) {
                        if (bindingAttributes.hasOwnProperty(key)) {
                            bindingAttribute = bindingAttributes[key];
                            if (bindingAttribute) {
                                value = bindingAttribute.value;
                                bindingDefinitions = bindingAttribute.bindingDefinitions;
                                $[key] = bindingCreator.evaluate(value, this, key, bindingDefinitions);
                            } else {
                                value = $[key];
                                bindingDefinitions = null;
                            }
                        }
                    }

                    if (this.$errorAttribute && this.$bindings[this.$errorAttribute]) {
                        var b = this.$bindings[this.$errorAttribute][0], errorBinding;
                        if (b.$.path.length > 1) {
                            var path = b.$.path.slice(), attrKey = path.pop().name;
                            path = path.concat(bindingCreator.parsePath("errors()." + attrKey));

                            errorBinding = bindingCreator.create({
                                type: 'oneWay',
                                path: path
                            }, this, "$error");
                            if (errorBinding) {
                                $['$error'] = errorBinding.getValue();
                            }
                        }
                    }

                    this._initializeBindingsBeforeComplete();

                    this._initializationComplete();
                }
1016543
function(attr, value) {
          var self = this,
              result = {},
              error;

          if(_.isObject(attr)){
            _.each(attr, function(value, key) {
              error = self.preValidate(key, value);
              if(error){
                result[key] = error;
              }
            });

            return _.isEmpty(result) ? undefined : result;
          }
          else {
            return validateAttr(this, attr, value, _.extend({}, this.attributes));
          }
        }
104459
private void addCreateUpdateAttributes() throws EFapsException
    {
        final Iterator<?> iter = getType().getAttributes().entrySet().iterator();
        while (iter.hasNext()) {
            final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) iter.next();
            final Attribute attr = (Attribute) entry.getValue();
            final AttributeType attrType = attr.getAttributeType();
            if (attrType.isCreateUpdate()) {
                addInternal(attr, false, (Object) null);
            }
            if (attr.getDefaultValue() != null) {
                addInternal(attr, false, attr.getDefaultValue());
            }
        }
    }
1064013
function JModelError(obj) {
    this.message = obj['message'];
    this.propertyName = obj['propertyName'];

    Error.call(this);
    Error.captureStackTrace(this, this.constructor);
}
268097
function (args) {
  var i;
  if (false === (this instanceof Model)) throw new Error('new operator required');
  this.attributes = [new Attribute('id', 'ID')];
  args = args || {};
  this.modelType = args.modelType || "Model";
  if (args.attributes) {
    for (i in args.attributes) {
      if (args.attributes.hasOwnProperty(i))
        this.attributes.push(args.attributes[i]);
    }
  }
  var unusedProperties = getInvalidProperties(args, ['modelType', 'attributes']);
  var errorList = this.getObjectStateErrors(); // before leaving make sure valid Model
  for (i = 0; i < unusedProperties.length; i++) errorList.push('invalid property: ' + unusedProperties[i]);
  if (errorList.length > 1) throw new Error('error creating Model: multiple errors');
  if (errorList.length) throw new Error('error creating Model: ' + errorList[0]);
  // Validations done
  this._eventListeners = [];
  this._errorConditions = {};
  for (i = 0; i < this.attributes.length; i++) {
   this.attributes[i].model = this;
  }
}
1174859
public void addAttribute(String key, Object value) {
        Objects.requireNonNull(key, Required.KEY.toString());
        this.attributes.put(key, value);
    }
394616
public void init(final String name, final int dim_x, final int dim_y) {
	buildAttributeValueObject(name);
	attrval.r_dim.dim_x = dim_x;
	attrval.r_dim.dim_y = dim_y;
    }