留言板

PortalException vs. SystemException

Richard Gal,修改在15 年前。

PortalException vs. SystemException

New Member 帖子: 19 加入日期: 08-4-24 最近的帖子
Hello

Can somebody explain to me the intended use of com.liferay.portal.PortalException and com.liferay.portal.SystemException?

Further, what is their relation to Liferay (remote) services? It seems that all built-in services throw one or both of these exceptions.

I was searching for the answer in the wiki and on this forum but have not found the answer. Looking into the source code it is only their name that is different.

Thanks in advance,
Richie.
Markus Bollerey,修改在14 年前。

RE: PortalException vs. SystemException

New Member 发布: 1 加入日期: 09-6-23 最近的帖子
Hello you all out there,

interesting issue that Richard brought up. No reactions, or comments?

Hmm??
thumbnail
mohammad azaruddin,修改在10 年前。

RE: PortalException vs. SystemException

Expert 帖子: 492 加入日期: 12-9-17 最近的帖子

Portal Exception
The base class for all exceptions related to business logic. Examples include invalid input, portlet errors, and references to non existent database records..Portal exceptions are generally caused by user error ,, and do not indicate that anything is wrong with the portal itself.


Example all exceptions created by service builder extends PortalException




System Exception
The base class for all exceptions caused by system problems. Examples include database connection errors and file not found errors.

System exceptions are always unexpected, and generally indicate that the portal is misconfigured or that a critical service is unavailable.