Include the source tileset in the NoSuchTileException.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2239 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: NoSuchTileException.java,v 1.2 2003/01/13 22:49:46 mdb Exp $
|
||||
// $Id: NoSuchTileException.java,v 1.3 2003/02/04 21:38:46 mdb Exp $
|
||||
|
||||
package com.threerings.media.tile;
|
||||
|
||||
@@ -9,9 +9,9 @@ package com.threerings.media.tile;
|
||||
*/
|
||||
public class NoSuchTileException extends RuntimeException
|
||||
{
|
||||
public NoSuchTileException (int tid)
|
||||
public NoSuchTileException (TileSet set, int tid)
|
||||
{
|
||||
super("No such tile [tid=" + tid + "]");
|
||||
super("No such tile [set=" + set + ", tid=" + tid + "]");
|
||||
_tid = tid;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TileSet.java,v 1.42 2003/01/24 21:42:15 mdb Exp $
|
||||
// $Id: TileSet.java,v 1.43 2003/02/04 21:38:46 mdb Exp $
|
||||
|
||||
package com.threerings.media.tile;
|
||||
|
||||
@@ -219,7 +219,7 @@ public abstract class TileSet
|
||||
// bail if there's no such tile
|
||||
int tcount = getTileCount();
|
||||
if (tileIndex < 0 || tileIndex >= tcount) {
|
||||
throw new NoSuchTileException(tileIndex);
|
||||
throw new NoSuchTileException(this, tileIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user