Dart API Reference
dart:core
RangeError
RangeError
class
Error thrown due to an index being outside a valid range.
Error thrown due to an index being outside a valid range.
Extends
Object
Error
ArgumentError
RangeError
Implemented by
IndexError
Constructors
RangeError
(
message
)
Create a new
RangeError
with the given message.
RangeError.value
(
num
value
, [
String
name
,
String
message
])
Create a new
RangeError
with a message for the given value.
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.index
(
int
index
,
indexable
, [
String
name
,
String
message
,
int
length
])
Creates a new
RangeError
stating that index is not a valid index into indexable.
Static Methods
checkValueInInterval
(
int
value
,
int
minValue
,
int
maxValue
, [
String
name
,
String
message
]) →
void
Check that a value lies in a specific interval.
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.
checkNotNegative
(
int
value
, [
String
name
,
String
message
]) →
void
Check that an integer value isn't negative.
Instance Properties
start
num
read-only
The minimum value that value is allowed to assume.
end
num
read-only
The maximum value that value is allowed to assume.
stackTrace
StackTrace
Inherited
read-only
invalidValue
dynamic
Inherited
read-only
The invalid value.
name
String
Inherited
read-only
Name of the invalid argument, if available.
message
dynamic
Inherited
read-only
Message describing the problem.
Instance Methods
toString
(
) →
String
Inherited
Returns a string representation of this object.