IndexOutOfBoundsException

Summary

Represents an out-of-bounds index access exception.

Description

Represents an out-of-bounds index access exception.

Examples

Example of using this exception with existent types
1
2
3
4
5
6
7
8
9
import System;
import System.Exceptions;
 
int[] emptyArray = [];
int+ someElement = emptyArray[100];
final bool elementDoesNotExist = undefined == someElement;
if (elementDoesNotExist) {
    throw new IndexOutOfBoundsException();
}

Methods

Share

HTML | BBCode | Direct Link