Spec-Zone.ru › Dart 2

dart:core

IndexError class

A specialized RangeError used when an index is not in the range 0..indexable.length-1.

Also contains the indexable object, its length at the time of the error, and the invalid index itself.

Inheritance
  • Object
  • Error
  • ArgumentError
  • IndexError
Implemented types
  • RangeError

Constructors

IndexError(int invalidValue, dynamic indexable, [String? name, String? message, int? length])
Creates a new IndexError stating that invalidValue is not a valid index into indexable.
IndexError.withLength(int invalidValue, int length, {Object? indexable, String? name, String? message})
Creates a new IndexError stating that invalidValue is not a valid index into indexable.

Properties

end → int
read-onlyoverride
The maximum value that value is allowed to assume.
hashCode → int
read-onlyinherited
The hash code for this object.
indexable → Object?
final
The indexable object that invalidValue was not a valid index into.
invalidValue → int
read-onlyoverride
The invalid value.
length → int
final
The length of indexable at the time of the error.
message → dynamic
finalinherited
Message describing the problem.
name → String?
finalinherited
Name of the invalid argument, if available.
runtimeType → Type
read-onlyinherited
A representation of the runtime type of the object.
stackTrace → StackTrace?
read-onlyinherited
The stack trace at the point where this error was first thrown.
start → int
read-onlyoverride
The minimum value that value is allowed to assume.

Methods

noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed.
toString() → String
inherited
A string representation of this object.

Operators

operator ==(Object other) → bool
inherited
The equality operator.

Static Methods

check(int index, int length, {Object? indexable, String? name, String? message}) → int
Check that index is a valid index into an indexable object.

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-core/IndexError-class.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API