Throw an informative exception if we fail to obtain a tile's image.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1670 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-09-11 19:17:55 +00:00
parent 752ee2fe8b
commit b5fa4d945f
@@ -1,5 +1,5 @@
//
// $Id: TileSetTrimmer.java,v 1.3 2002/09/09 20:26:52 shaper Exp $
// $Id: TileSetTrimmer.java,v 1.4 2002/09/11 19:17:55 shaper Exp $
package com.threerings.media.tile.util;
@@ -90,6 +90,12 @@ public class TileSetTrimmer
try {
Tile tile = source.getTile(ii);
timgs[ii] = (BufferedImage)tile.getImage();
} catch (RasterFormatException rfe) {
throw new IOException("Failed to get tile image " +
"[tidx=" + ii + ", tset=" + source +
", rfe=" + rfe + "].");
} catch (NoSuchTileException nste) {
throw new RuntimeException("WTF? No such tile [tset=" + source +
", tidx=" + ii + "]");