JObject/setError: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 4: | Line 4: | ||
===Syntax=== | ===Syntax=== | ||
| Line 34: | Line 34: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=setError | category=setError | ||
category=JObject | category=JObject | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 01:56, 25 March 2017
Description
Add an error message.
Syntax
setError($error)
| Parameter Name | Default Value | Description |
|---|---|---|
| $error | $error Error message. |
Defined in
libraries/joomla/base/object.php
Importing
jimport( 'joomla.base.object' );
Source Body
public function setError($error)
{
array_push($this->_errors, $error);
}
Examples
Code Examples