On this page
IndexError constructor
IndexError(Creates a new IndexError stating that invalidValue
is not a valid index into indexable
.
The length
is the length of indexable
at the time of the error. If length
is omitted, it defaults to indexable.length
.
The message is used as part of the string representation of the error.
Source
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");
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/IndexError/IndexError.html