Support Joomla!

references:joomla.framework:application:jcontroller-seterror

Table of Contents

setError

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JController Method setError Reference setError() Never Work in Progress

Sets the error message.

This error message can later be retrieved using the JController->getError() method.

This method will return the error message that was set (directly from the class property, so if for some reason something goes wrong, the return value will indicate this).

Syntax

string setError ( $message )

$message string is a string containing the error message.

Examples

Example

$controller->setError( 'Not going to happen!' );
echo $controller->getError();

might produce

Result

Not going to happen!

 
references/joomla.framework/application/jcontroller-seterror.txt (597 views) · Last modified: 2007/08/15 14:50