瀏覽代碼

Change the compare function error in ListSort to be more user friendly and indicate the likely cause of the error.

shadowislord 11 年之前
父節點
當前提交
2b83b65f69
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      jme3-core/src/main/java/com/jme3/util/ListSort.java

+ 2 - 1
jme3-core/src/main/java/com/jme3/util/ListSort.java

@@ -699,7 +699,8 @@ public class ListSort<T> {
             // The last element of run A belongs at the end of the merge.
             arr[dest + lengthB] = tempArray[iterA];
         } else if(lengthA== 0){
-            throw new UnsupportedOperationException("Inconsistant comparison function");
+            throw new UnsupportedOperationException("Compare function result changed! " +
+                                                    "Make sure you do not modify the scene from another thread!");
         } else {//Fail label
             System.arraycopy(tempArray, iterA, arr, dest, lengthA);
         }