Skip to content

Commit

Permalink
Merge pull request #704 from apache/ISIS-2730
Browse files Browse the repository at this point in the history
ISIS-2730: catches exception and falls back to welcome page
  • Loading branch information
danhaywood committed Aug 5, 2021
2 parents c686be7 + d9438b8 commit ccd7c81
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -61,7 +61,14 @@ private void buildGui() {

if(ManagedObjects.isSpecified(homePageAdapter)) {
val requestCycle = RequestCycle.get();
requestCycle.setResponsePage(new EntityPage(getCommonContext(), homePageAdapter));
try {
val page = new EntityPage(getCommonContext(), homePageAdapter);
requestCycle.setResponsePage(page);
} catch (Exception ignore) {
// fallback (eg if permissions problem)
Components.permanentlyHide(themeDiv, ComponentType.ACTION_PROMPT);
getComponentFactoryRegistry().addOrReplaceComponent(themeDiv, ComponentType.WELCOME, null);
}

} else {
Components.permanentlyHide(themeDiv, ComponentType.ACTION_PROMPT);
Expand Down

0 comments on commit ccd7c81

Please sign in to comment.