| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Utilities |
JError |
getErrors |
getErrors() |
Never | Work in Progress |
Retrieves the errors that are stored. This function returns a chronological array of errors that have been stored during script execution. Storing errors is one of multiple methods. See the setErrorHandling method for more information.
array getErrors ()
Example
JError::setErrorHandling( E_ALL, 'store' ); JError::raiseNotice( '253', 'THIS IS ONLY A TEST!' ); $errors = JError::getErrors(); foreach ($errors as $error) { echo $error->message; }
might produce:
Result
THIS IS ONLY A TEST!