int lastdot = module.lastIndexOf(".");
String base = module.substring(0, lastdot);
String simpleName = module.substring(lastdot + 1);
+ // TODO figure out (ask around) WTF this is almost-removed
// if (!wsname.startsWith(base) || !wsname.endsWith(simpleName)) {
// // WidgetSet module name does not match implementation name;
// // probably inherited WidgetSet with entry-point. Skip.
String msg = "Tried to init " + widgetset.getClass().getName()
+ ", but " + initedWidgetSet.getClass().getName()
+ " was already inited.";
- ApplicationConnection.getConsole().log(msg);
+ throw new IllegalStateException(msg);
}
initedWidgetSet = widgetset;
ArrayList<String> appIds = new ArrayList<String>();
* This is the entry point method. It will start the first
*/
public void onModuleLoad() {
- ApplicationConfiguration.initConfigurations(this);
+ try {
+ ApplicationConfiguration.initConfigurations(this);
+ } catch (Exception e) {
+ // Log & don't continue;
+ // custom WidgetSets w/ entry points will cause this
+ ApplicationConnection.getConsole().log(e.getMessage());
+ return;
+ }
ApplicationConfiguration.startNextApplication(); // start first app
map = GWT.create(WidgetMap.class);
}