Support Joomla!

references:joomla.framework:utilities:jerror-iserror

Table of Contents

isError

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Utilities Class JError Method isError Reference isError() Never Work in Progress

Determines whether the return value of a pat application method (i.e. patTemplate method) is a patError object. If it is, the funtion returns true. Otherwise, it returns false.

Syntax

boolean isError ( &$object )

&$object mixed is the return value of the pat application method. If this is an object of type patError, the function will return true. Otherwise, it will return false.

Examples

Example

JError::setErrorHandling( E_ALL, 'store' );

$template = JTemplate::getInstance();
$template->readTemplatesFromInput( 'page.html' );
$result = $template->fetch( 'wrongname' );

if (JError::isError( $result ) ) {
    echo "Yes, it is an error";
} else {
    echo "No, it is not an error";
}

might produce:

Result

Yes, it is an error
 
references/joomla.framework/utilities/jerror-iserror.txt (655 views) · Last modified: 2007/09/22 02:51