Nicolas Cannasse vor 8 Jahren
Ursprung
Commit
29ce3eb4c1
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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 ) {