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 ) {