API16

JError/handleMessage: Difference between revisions

From Joomla! Documentation

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...
 
Doxiki (talk | contribs)
No edit summary
Line 19: Line 19:
!Description
!Description
|-
|-
|  
| &$error
|  
|  
|  $error  object to handle  
|  $error  object to handle  

Revision as of 10:08, 30 March 2010

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 $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 />