try { // perform some action that may result in a notice being raised // if a notice is raised, it will trigger the catch block below } catch (Exception $e) { // display the notice message to the user JError::raiseNotice(100, 'A notice message'); }
// display a notice message to the user JError::raiseNotice(200, 'Another notice message');This example shows how to use JError raiseNotice to display a notice message without catching an exception. The JError class is part of the Joomla framework and is located in the package library at /libraries/joomla/error/error.php.