I have the following code in a velocity template theme:
#set($currLayout = $layoutLocalService.getFriendlyURLLayout($group_id, true, $currFriendlyUrl))
which throws a
com.liferay.portal.NoSuchLayoutException
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.getFriendlyURLLayout(LayoutLocalServiceImpl.java:959)
when matching layout not exist.
How could I catch this exception in my velocity template?