Changed a bunch of Thread.dumpStack() calls into stack traces properly logged
via the logging system. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@806 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -44,9 +44,8 @@ public abstract class CardGameController extends GameController
|
||||
{
|
||||
if (_ctx.getClient().getClientObject().receivers.containsKey(
|
||||
CardGameDecoder.RECEIVER_CODE)) {
|
||||
log.warning("Yuh oh, we already have a card game receiver " +
|
||||
"registered and are trying for another...!");
|
||||
Thread.dumpStack();
|
||||
log.warning("Yuh oh, we already have a card game receiver registered and are trying " +
|
||||
"for another...!", new Exception());
|
||||
}
|
||||
|
||||
_ctx.getClient().getInvocationDirector().registerReceiver(new CardGameDecoder(this));
|
||||
|
||||
@@ -430,8 +430,8 @@ public class GameManager extends PlaceManager
|
||||
{
|
||||
// complain if we're already started
|
||||
if (_gameobj.state == GameObject.IN_PLAY) {
|
||||
log.warning("Requested to start an already in-play game [game=" + where() + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Requested to start an already in-play game", "game", where(),
|
||||
new Exception());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -397,21 +397,20 @@ public abstract class PuzzleController extends GameController
|
||||
|
||||
// refuse to start the action if our puzzle view is hidden
|
||||
if (_pidx != -1 && !_panel.getBoardView().isShowing()) {
|
||||
log.warning("Refusing to start action on hidden puzzle.");
|
||||
Thread.dumpStack();
|
||||
log.warning("Refusing to start action on hidden puzzle.", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
// refuse to start the action if it's already going
|
||||
if (_astate != ACTION_CLEARED) {
|
||||
log.warning("Action state inappropriate for startAction()", "astate", _astate);
|
||||
Thread.dumpStack();
|
||||
log.warning("Action state inappropriate for startAction()", "astate", _astate,
|
||||
new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
if (isChatting() && supportsActionPause()) {
|
||||
log.info(
|
||||
"Not starting action, player is chatting in a puzzle that supports pausing the action.");
|
||||
log.info("Not starting action, player is chatting in a puzzle that supports " +
|
||||
"pausing the action.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,8 +138,8 @@ public abstract class DropBoardView extends PuzzleBoardView
|
||||
public void createPiece (int piece, int sx, int sy)
|
||||
{
|
||||
if (sx < 0 || sy < 0 || sx >= _bwid || sy >= _bhei) {
|
||||
log.warning("Requested to create piece in invalid location", "sx", sx, "sy", sy);
|
||||
Thread.dumpStack();
|
||||
log.warning("Requested to create piece in invalid location", "sx", sx, "sy", sy,
|
||||
new Exception());
|
||||
return;
|
||||
}
|
||||
createPiece(piece, sx, sy, sx, sy, 0L);
|
||||
@@ -165,8 +165,8 @@ public abstract class DropBoardView extends PuzzleBoardView
|
||||
public void updatePiece (int piece, int sx, int sy)
|
||||
{
|
||||
if (sx < 0 || sy < 0 || sx >= _bwid || sy >= _bhei) {
|
||||
log.warning("Requested to update piece in invalid location", "sx", sx, "sy", sy);
|
||||
Thread.dumpStack();
|
||||
log.warning("Requested to update piece in invalid location", "sx", sx, "sy", sy,
|
||||
new Exception());
|
||||
return;
|
||||
}
|
||||
int spos = sy * _bwid + sx;
|
||||
@@ -186,8 +186,7 @@ public abstract class DropBoardView extends PuzzleBoardView
|
||||
{
|
||||
if (tx < 0 || ty < 0 || tx >= _bwid || ty >= _bhei) {
|
||||
log.warning("Requested to create and move piece to invalid location",
|
||||
"tx", tx, "ty", ty);
|
||||
Thread.dumpStack();
|
||||
"tx", tx, "ty", ty, new Exception());
|
||||
return;
|
||||
}
|
||||
Sprite sprite = createPieceSprite(piece, sx, sy);
|
||||
|
||||
@@ -270,8 +270,7 @@ public class StageSceneUtil
|
||||
double radius = (double)fwid/2;
|
||||
int clidx = cluster.width-2;
|
||||
if (clidx >= CLUSTER_METRICS.length/2 || clidx < 0) {
|
||||
log.warning("Requested locs from invalid cluster " + cluster + ".");
|
||||
Thread.dumpStack();
|
||||
log.warning("Requested locs from invalid cluster " + cluster + ".", new Exception());
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user