Difference between revisions of "JException"
From Joomla! Documentation
(Layout updates) |
m (moving preparation) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | __NOTOC__ | + | {{deprecated|when=1.5|from=2.5,11.1|old=JException|link=J2.5:Exceptions and Logging in Joomla Platform 11.1 and Joomla 2.5|new=PHP exceptions instead}}__NOTOC__ |
+ | =={{JVer|11.1}} JException== | ||
+ | ===Description=== | ||
+ | {{Description:JException}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JException|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JException|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
+ | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
− | |[[JException::__construct | + | |public |
+ | |[[API17:JException::__construct|__construct]] | ||
|Constructor | |Constructor | ||
|- | |- | ||
− | |[[JException::__toString | + | |public |
+ | |[[API17:JException::__toString|__toString]] | ||
|Returns to error message. | |Returns to error message. | ||
|- | |- | ||
− | |[[JException::get | + | |public |
+ | |[[API17:JException::get|get]] | ||
|Returns a property of the object or the default value if the property is not set. | |Returns a property of the object or the default value if the property is not set. | ||
|- | |- | ||
− | |[[JException::getError | + | |public |
+ | |[[API17:JException::getError|getError]] | ||
|Get the most recent error message. | |Get the most recent error message. | ||
|- | |- | ||
− | |[[JException::getErrors | + | |public |
+ | |[[API17:JException::getErrors|getErrors]] | ||
|Return all errors, if any. | |Return all errors, if any. | ||
|- | |- | ||
− | |[[JException::getProperties | + | |public |
+ | |[[API17:JException::getProperties|getProperties]] | ||
|Returns an associative array of object properties. | |Returns an associative array of object properties. | ||
|- | |- | ||
− | |[[JException::set | + | |public |
+ | |[[API17:JException::set|set]] | ||
|Modifies a property of the object, creating it if it does not already exist. | |Modifies a property of the object, creating it if it does not already exist. | ||
|- | |- | ||
− | |[[JException::setError | + | |public |
+ | |[[API17:JException::setError|setError]] | ||
|Add an error message. | |Add an error message. | ||
|- | |- | ||
− | |[[JException::setProperties | + | |public |
+ | |[[API17:JException::setProperties|setProperties]] | ||
|Set the object properties based on a named array/hash. | |Set the object properties based on a named array/hash. | ||
|- | |- | ||
− | |[[JException::toString | + | |public |
+ | |[[API17:JException::toString|toString]] | ||
|Returns to error message. | |Returns to error message. | ||
|- | |- | ||
|} | |} | ||
+ | * '''Defined in''' libraries/joomla/error/exception.php | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.error.exception' );</source> | <source lang="php">jimport( 'joomla.error.exception' );</source> | ||
===See also=== | ===See also=== | ||
− | * JException source code | + | * {{JVer|11.1}} '''JException source code''' on [[jplatform:error/exception.php|BitBucket]] |
− | * [[JException|Other versions of | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Error|Error]] |
+ | * [[API17:JException|Other versions of JException]] | ||
{{SeeAlso:JException}} | {{SeeAlso:JException}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JException|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JException|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
− | === | + | ===User contributed notes=== |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
Line 66: | Line 74: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Revision as of 20:36, 11 May 2013
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JException[edit]
Description[edit]
Template:Description:JException [Edit Descripton]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | __construct | Constructor |
public | __toString | Returns to error message. |
public | get | Returns a property of the object or the default value if the property is not set. |
public | getError | Get the most recent error message. |
public | getErrors | Return all errors, if any. |
public | getProperties | Returns an associative array of object properties. |
public | set | Modifies a property of the object, creating it if it does not already exist. |
public | setError | Add an error message. |
public | setProperties | Set the object properties based on a named array/hash. |
public | toString | Returns to error message. |
- Defined in libraries/joomla/error/exception.php
Importing[edit]
jimport( 'joomla.error.exception' );
See also[edit]
- JException source code on BitBucket
- Subpackage Error
- Other versions of JException
Template:SeeAlso:JException [Edit See Also]
User contributed notes[edit]
<CodeExamplesForm />