瀏覽代碼

[libgdx] Better exception message for Batch that can't render meshes.

NathanSweet 8 年之前
父節點
當前提交
f06bfd9f16
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java

+ 2 - 3
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java

@@ -101,9 +101,8 @@ public class SkeletonRenderer {
 				continue;
 
 			} else if (attachment instanceof MeshAttachment) {
-				throw new RuntimeException(
-					"SkeletonRenderer#draw(PolygonSpriteBatch, Skeleton) or #draw(TwoColorPolygonBatch, Skeleton) must be used to "
-						+ "render meshes.");
+				throw new RuntimeException(batch.getClass().getSimpleName()
+					+ " cannot render meshes, PolygonSpriteBatch or TwoColorPolygonBatch is required.");
 
 			} else if (attachment instanceof SkeletonAttachment) {
 				Skeleton attachmentSkeleton = ((SkeletonAttachment)attachment).getSkeleton();