Throw GuiDevelopmentException if datasource is not set in window #PL-4343

This commit is contained in:
Gleb Gorelov 2015-04-10 10:27:25 +00:00
parent 48dfead0f1
commit ea9fba63a8

View File

@ -9,6 +9,7 @@ import com.haulmont.cuba.core.entity.Entity;
import com.haulmont.cuba.core.global.AppBeans;
import com.haulmont.cuba.gui.ComponentVisitor;
import com.haulmont.cuba.gui.ComponentsHelper;
import com.haulmont.cuba.gui.GuiDevelopmentException;
import com.haulmont.cuba.gui.WindowManager;
import com.haulmont.cuba.gui.config.WindowConfig;
import com.haulmont.cuba.gui.config.WindowInfo;
@ -87,7 +88,7 @@ public class WindowDelegate {
}
}
if (ds == null)
throw new IllegalStateException("Can't find main datasource");
throw new GuiDevelopmentException("Can't find main datasource", window.getId());
else
return ds;
}