Was a little too overzealous on the errors during change-location calls. Times when the user is already there or already moving should just be silently ignored to avoid flooding the user with extraneous feedback. Also, use a better error for the case when they just somehow aren't currently in a scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3890 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -201,7 +201,8 @@ public class SpotSceneDirector extends BasicDirector
|
||||
Log.info("Not going to " + loc + "; we're at " + _location +
|
||||
" and we're headed to " + _pendingLoc + ".");
|
||||
if (listener != null) {
|
||||
listener.requestFailed(new InvocationException(ALREADY_THERE));
|
||||
// This isn't really a failure, it's just a no-op.
|
||||
listener.requestCompleted(_location);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -210,8 +211,8 @@ public class SpotSceneDirector extends BasicDirector
|
||||
Log.info("Not going to " + loc + "; we're at " + _location +
|
||||
" and we're headed to " + _pendingLoc + ".");
|
||||
if (listener != null) {
|
||||
listener.requestFailed(
|
||||
new InvocationException(MOVE_IN_PROGRESS));
|
||||
// Already moving, best thing to do is ignore it.
|
||||
listener.requestCompleted(_pendingLoc);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -221,7 +222,8 @@ public class SpotSceneDirector extends BasicDirector
|
||||
Log.warning("Requested to change locations, but we're not " +
|
||||
"currently in any scene [loc=" + loc + "].");
|
||||
if (listener != null) {
|
||||
listener.requestFailed(new InvocationException(NO_SUCH_PLACE));
|
||||
listener.requestFailed(
|
||||
new InvocationException("m.cant_get_there"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -265,7 +267,7 @@ public class SpotSceneDirector extends BasicDirector
|
||||
Log.warning("Requested to join cluster, but we're not " +
|
||||
"currently in any scene [froid=" + froid + "].");
|
||||
if (listener != null) {
|
||||
listener.requestFailed(new Exception(NO_SUCH_PLACE));
|
||||
listener.requestFailed(new Exception("m.cant_get_there"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user