Nicolas Cannasse %!s(int64=8) %!d(string=hai) anos
pai
achega
29ce3eb4c1
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      std/hl/types/ArrayBytes.hx
  2. 1 1
      std/hl/types/ArrayObj.hx

+ 1 - 1
std/hl/types/ArrayBytes.hx

@@ -281,7 +281,7 @@ class BytesIterator<T> {
 
 	// called by compiler when accessing the array outside of its bounds, might trigger resize
 	function __expand( index : Int ) {
-		if( index < 0 ) throw "Invalid array access";
+		if( index < 0 ) throw "Invalid array index "+index;
 		var newlen = index + 1;
 		if( newlen > size ) {
 			var next = (size * 3) >> 1;

+ 1 - 1
std/hl/types/ArrayObj.hx

@@ -239,7 +239,7 @@ class ArrayObj<T> extends ArrayBase {
 
 	// called by compiler when accessing the array outside of its bounds, might trigger resize
 	function __expand( index : Int ) {
-		if( index < 0 ) throw "Invalid array access";
+		if( index < 0 ) throw "Invalid array index " + index;
 		var newlen = index + 1;
 		var size : Int = array.length;
 		if( newlen > size ) {