Fail earlier and more informatively.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@546 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -95,6 +95,10 @@ public class EZGameConfig extends GameConfig
|
||||
@Override // from PlaceConfig
|
||||
public PlaceController createController ()
|
||||
{
|
||||
String ctrl = getGameDefinition().controller;
|
||||
if (ctrl == null) {
|
||||
throw new IllegalStateException("Game definition missing controller [gdef=" + getGameDefinition() + "]");
|
||||
}
|
||||
try {
|
||||
return (PlaceController) Class.forName(getGameDefinition().controller).newInstance();
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user