not throwing Liferay exception on public method fixed, catching them

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portal/portal-manager@128231 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2016-04-21 12:11:30 +00:00
parent 78c6497969
commit 75905b622d
1 changed files with 19 additions and 14 deletions

View File

@ -155,14 +155,19 @@ public class PortalContext {
* @throws PortalException * @throws PortalException
* @throws SystemException * @throws SystemException
*/ */
public String getSiteLandingPagePath(final HttpServletRequest request) throws PortalException, SystemException { public String getSiteLandingPagePath(final HttpServletRequest request) {
String sitePath = StringPool.BLANK; String sitePath = StringPool.BLANK;
Group site = getSiteFromServletRequest(request); Group site;
try {
site = getSiteFromServletRequest(request);
if (site.getPrivateLayoutsPageCount() > 0) { if (site.getPrivateLayoutsPageCount() > 0) {
sitePath = getGroupFriendlyURL(request, site); sitePath = getGroupFriendlyURL(request, site);
} else { } else {
_log.debug(site.getName() + " site doesn't have any private page. Default landing page will be used"); _log.debug(site.getName() + " site doesn't have any private page. Default landing page will be used");
} }
}catch (Exception e) {
e.printStackTrace();
}
return sitePath; return sitePath;
} }
/** /**