From ff97ce2c2593e8005668b26e8b336a71516e1417 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 5 Feb 2002 22:57:44 +0000 Subject: [PATCH] Report the error if we fail to load game config; minor restructuring. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@941 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../simulator/client/ClientController.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/java/com/threerings/micasa/simulator/client/ClientController.java b/src/java/com/threerings/micasa/simulator/client/ClientController.java index 8e9875646..7f8bb4557 100644 --- a/src/java/com/threerings/micasa/simulator/client/ClientController.java +++ b/src/java/com/threerings/micasa/simulator/client/ClientController.java @@ -1,5 +1,5 @@ // -// $Id: ClientController.java,v 1.2 2002/01/16 02:59:08 mdb Exp $ +// $Id: ClientController.java,v 1.3 2002/02/05 22:57:44 mdb Exp $ package com.threerings.micasa.simulator.client; @@ -65,23 +65,24 @@ public class ClientController // keep the body object around for stuff _body = (BodyObject)client.getClientObject(); - // create the game config object GameConfig config = null; try { + // create the game config object config = (GameConfig) Class.forName(_info.gameConfigClass).newInstance(); + + // send the game creation request + SimulatorDirector.createGame( + client, config, _info.simClass, _info.playerCount); + + // our work here is done, as the location manager will move us + // into the game room straightaway + } catch (Exception e) { Log.warning("Failed to instantiate game config " + - "[class=" + _info.gameConfigClass + "]."); - return; + "[class=" + _info.gameConfigClass + + ", error=" + e + "]."); } - - // send the game creation request - SimulatorDirector.createGame( - client, config, _info.simClass, _info.playerCount); - - // our work here is done, as the location manager will move us - // into the game room straightaway } // documentation inherited