Nicolas Cannasse 8 年之前
父节点
当前提交
29ce3eb4c1
共有 2 个文件被更改,包括 2 次插入2 次删除
  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 ) {