@@ -99,7 +99,7 @@ public void Add(IValue value = null)
9999 public void Insert ( int index , IValue value = null )
100100 {
101101 if ( index < 0 )
102- throw IndexOutOfBoundsException ( ) ;
102+ throw RuntimeException . IndexOutOfRange ( ) ;
103103
104104 if ( index > _values . Count )
105105 Extend ( index - _values . Count ) ;
@@ -128,7 +128,7 @@ public IValue Find(IValue what)
128128 public void Remove ( int index )
129129 {
130130 if ( index < 0 || index >= _values . Count )
131- throw IndexOutOfBoundsException ( ) ;
131+ throw RuntimeException . IndexOutOfRange ( ) ;
132132
133133 _values . RemoveAt ( index ) ;
134134 }
@@ -143,7 +143,7 @@ public int UpperBound()
143143 public IValue Get ( int index )
144144 {
145145 if ( index < 0 || index >= _values . Count )
146- throw IndexOutOfBoundsException ( ) ;
146+ throw RuntimeException . IndexOutOfRange ( ) ;
147147
148148 return _values [ index ] ;
149149 }
@@ -152,7 +152,7 @@ public IValue Get(int index)
152152 public void Set ( int index , IValue value )
153153 {
154154 if ( index < 0 || index >= _values . Count )
155- throw IndexOutOfBoundsException ( ) ;
155+ throw RuntimeException . IndexOutOfRange ( ) ;
156156
157157 _values [ index ] = value ;
158158 }
@@ -234,10 +234,5 @@ public static ArrayImpl Constructor(FixedArrayImpl fixedArray)
234234 {
235235 return new ArrayImpl ( fixedArray ) ;
236236 }
237-
238- private static RuntimeException IndexOutOfBoundsException ( )
239- {
240- return new RuntimeException ( "Значение индекса выходит за пределы диапазона" ) ;
241- }
242237 }
243238}
0 commit comments