Error thrown due to an index being outside a valid range.

Inheritance
Implemented by

Static Methods

checkNotNegative(int value, [ String name, String message ]) → void

Check that an integer value isn't negative.

checkValidIndex(int index, indexable, [ String name, int length, String message ]) → void

Check that a value is a valid index into an indexable object.

checkValidRange(int start, int end, int length, [ String startName, String endName, String message ]) int

Check that a range represents a slice of an indexable object.

checkValueInInterval(int value, int minValue, int maxValue, [ String name, String message ]) → void

Check that a value lies in a specific interval.

Constructors

RangeError(message)

Create a new RangeError with the given message.

RangeError.index(int index, indexable, [ String name, String message, int length ])

Creates a new RangeError stating that index is not a valid index into indexable.

factory
RangeError.range(num invalidValue, int minValue, int maxValue, [ String name, String message ])

Create a new RangeError with for an invalid value being outside a range.

RangeError.value(num value, [ String name, String message ])

Create a new RangeError with a message for the given value.

Properties

end num

The maximum value that value is allowed to assume.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
invalidValue → dynamic

The invalid value.

read-only, inherited
message → dynamic

Message describing the problem.

read-only, inherited
name String

Name of the invalid argument, if available.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited
stackTrace StackTrace

read-only, inherited
start num

The minimum value that value is allowed to assume.

read-only

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited