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:
@@ -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;
|
package com.threerings.media.tile.util;
|
||||||
|
|
||||||
@@ -90,6 +90,12 @@ public class TileSetTrimmer
|
|||||||
try {
|
try {
|
||||||
Tile tile = source.getTile(ii);
|
Tile tile = source.getTile(ii);
|
||||||
timgs[ii] = (BufferedImage)tile.getImage();
|
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) {
|
} catch (NoSuchTileException nste) {
|
||||||
throw new RuntimeException("WTF? No such tile [tset=" + source +
|
throw new RuntimeException("WTF? No such tile [tset=" + source +
|
||||||
", tidx=" + ii + "]");
|
", tidx=" + ii + "]");
|
||||||
|
|||||||
Reference in New Issue
Block a user