Skip to content

Commit

Permalink
ISIS-2730: catches exception and falls back to welcome page
Browse files Browse the repository at this point in the history
(cherry picked from commit 16eb40a)
  • Loading branch information
danhaywood committed Aug 5, 2021
1 parent c686be7 commit d9438b8
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
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 d9438b8

Please sign in to comment.