API16

API16:JError/handleMessage

From Joomla! Documentation

Revision as of 22:44, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Message error handler Enqueues the error message into the system queue <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JError/hand...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Message error handler Enqueues the error message into the system queue


[Edit Descripton]

Template:Description:JError/handleMessage

Syntax

static handleMessage(&$error, $options)
Parameter Name Default Value Description
$error object to handle
$options $options Handler options

Returns

object The exception object

Defined in

libraries/joomla/error/error.php

Importing

jimport( 'joomla.error.error' );

Source Body

public static function handleMessage(& $error, $options)
{
        $appl = JFactory::getApplication();
        $type = ($error->get('level') == E_NOTICE) ? 'notice' : 'error';
        $appl->enqueueMessage($error->get('message'), $type);
        return $error;
}

[Edit See Also] Template:SeeAlso:JError/handleMessage

Examples

<CodeExamplesForm />