anchor.diff:     * Create a new [RangeError] with the given [message].
      */
     RangeError(var message)
  -      : invalidValue = null, start = null, end = null, super(message);
  -
  -  /** Create a new [RangeError] with a message for the given [value]. */
  -  RangeError.value(num value, [String message = "Value not in range"])
  -      : invalidValue = value, start = null, end = null,
  -        super(message);
  +      : start = null, end = null, super(message);
  +
  +  /**
  +   * Create a new [RangeError] with a message for the given [value].
  +   *
  +   * An optional [name] can specify the argument name that has the
  +   * invalid value, and the [message] can override the default error
  +   * description.
  +   */
  +  RangeError.value(num value, [String name, String message])
  +      : start = null, end = null,
  +        super.value(value, name,
  +                    (message != null) ? message : "Value not in range");
   
     /**
      * Create a new [RangeError] with for an invalid value being outside a range.
  
positive.code:  * Error thrown due to an index being outside a valid range.
   */
  class RangeError extends ArgumentError {
    /** The value that is outside its valid range. */
    final num invalidValue;
    /** The minimum value that [value] is allowed to assume. */
    final num start;
    /** The maximum value that [value] is allowed to assume. */
  
negative.code:    *
     * The message is used as part of the string representation of the error.
     */
    IndexError(int invalidValue, indexable,
               [String name, String message, int length])
        : this.indexable = indexable,
          this.length = (length != null) ? length : indexable.length,
          super.value(invalidValue, name,
                      (message != null) ? message : "Index out of range");
  
    // Getters inherited from RangeError.
    int get start => 0;
    int get end => length - 1;
  
    String toString() {
      assert(_hasValue);
      String target = Error.safeToString(indexable);
      var explanation = "index should be less than $length";
      if (invalidValue < 0) {
        explanation = "index must not be negative";
      }
      return "RangeError: $message ($target[$invalidValue]): $explanation";
    }
  }
  
  