Improved error checking and reporting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@769 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: LocationDirector.java,v 1.14 2001/10/24 03:10:30 mdb Exp $
|
// $Id: LocationDirector.java,v 1.15 2001/12/13 06:34:40 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.client;
|
package com.threerings.crowd.client;
|
||||||
|
|
||||||
@@ -173,15 +173,16 @@ public class LocationDirector
|
|||||||
_previousPlaceId = _placeId;
|
_previousPlaceId = _placeId;
|
||||||
_placeId = placeId;
|
_placeId = placeId;
|
||||||
|
|
||||||
|
Class cclass = config.getControllerClass();
|
||||||
try {
|
try {
|
||||||
// start up a new place controller to manage the new place
|
// start up a new place controller to manage the new place
|
||||||
Class cclass = config.getControllerClass();
|
|
||||||
_controller = (PlaceController)cclass.newInstance();
|
_controller = (PlaceController)cclass.newInstance();
|
||||||
_controller.init(_ctx, config);
|
_controller.init(_ctx, config);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.warning("Error creating or initializing place controller " +
|
Log.warning("Error creating or initializing place controller " +
|
||||||
"[config=" + config + "].");
|
"[cclass=" + cclass.getName() +
|
||||||
|
", config=" + config + "].");
|
||||||
Log.logStackTrace(e);
|
Log.logStackTrace(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,12 +287,14 @@ public class LocationDirector
|
|||||||
_plobj = (PlaceObject)object;
|
_plobj = (PlaceObject)object;
|
||||||
|
|
||||||
// let the place controller know that we're ready to roll
|
// let the place controller know that we're ready to roll
|
||||||
try {
|
if (_controller != null) {
|
||||||
_controller.willEnterPlace(_plobj);
|
try {
|
||||||
} catch (Exception e) {
|
_controller.willEnterPlace(_plobj);
|
||||||
Log.warning("Controller choked in willEnterPlace " +
|
} catch (Exception e) {
|
||||||
"[place=" + _plobj + "].");
|
Log.warning("Controller choked in willEnterPlace " +
|
||||||
Log.logStackTrace(e);
|
"[place=" + _plobj + "].");
|
||||||
|
Log.logStackTrace(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// let our observers know that all is well on the western front
|
// let our observers know that all is well on the western front
|
||||||
|
|||||||
Reference in New Issue
Block a user