JError/1.5
From Joomla! Documentation
< JError(Difference between revisions)
(Bulk upload by Doxiki2) |
(Layout updates) |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | =={{JVer|1.5}} JError== | ||
| + | ===Description=== | ||
| + | {{Description:JError}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JError|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JError|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
| + | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
| + | |public | ||
|[[JError::attachHandler/1.5|attachHandler]] | |[[JError::attachHandler/1.5|attachHandler]] | ||
|Method that attaches the error handler to . | |Method that attaches the error handler to . | ||
|- | |- | ||
| + | |public | ||
|[[JError::customErrorHandler/1.5|customErrorHandler]] | |[[JError::customErrorHandler/1.5|customErrorHandler]] | ||
| | | | ||
|- | |- | ||
| + | |public | ||
|[[JError::detachHandler/1.5|detachHandler]] | |[[JError::detachHandler/1.5|detachHandler]] | ||
|Method that dettaches the error handler from . | |Method that dettaches the error handler from . | ||
|- | |- | ||
| + | |public | ||
|[[JError::customErrorPage/1.5|customErrorPage]] | |[[JError::customErrorPage/1.5|customErrorPage]] | ||
|Display a custom error page and exit gracefully. | |Display a custom error page and exit gracefully. | ||
|- | |- | ||
| + | |public | ||
|[[JError::getError/1.5|getError]] | |[[JError::getError/1.5|getError]] | ||
|Method for retrieving the last exception object in the error stack. | |Method for retrieving the last exception object in the error stack. | ||
|- | |- | ||
| + | |public | ||
|[[JError::getErrorHandling/1.5|getErrorHandling]] | |[[JError::getErrorHandling/1.5|getErrorHandling]] | ||
|Method to get the current error handler settings for a specified error level. | |Method to get the current error handler settings for a specified error level. | ||
|- | |- | ||
| + | |public | ||
|[[JError::getErrors/1.5|getErrors]] | |[[JError::getErrors/1.5|getErrors]] | ||
|Method for retrieving the exception stack. | |Method for retrieving the exception stack. | ||
|- | |- | ||
| + | |public | ||
|[[JError::handleCallback/1.5|handleCallback]] | |[[JError::handleCallback/1.5|handleCallback]] | ||
|Callback error handler | |Callback error handler | ||
|- | |- | ||
| + | |public | ||
|[[JError::handleDie/1.5|handleDie]] | |[[JError::handleDie/1.5|handleDie]] | ||
|Die error handler | |Die error handler | ||
|- | |- | ||
| + | |public | ||
|[[JError::handleEcho/1.5|handleEcho]] | |[[JError::handleEcho/1.5|handleEcho]] | ||
|Echo error handler | |Echo error handler | ||
|- | |- | ||
| + | |public | ||
|[[JError::handleIgnore/1.5|handleIgnore]] | |[[JError::handleIgnore/1.5|handleIgnore]] | ||
|Ignore error handler | |Ignore error handler | ||
|- | |- | ||
| + | |public | ||
|[[JError::handleLog/1.5|handleLog]] | |[[JError::handleLog/1.5|handleLog]] | ||
|Log error handler | |Log error handler | ||
|- | |- | ||
| + | |public | ||
|[[JError::handleMessage/1.5|handleMessage]] | |[[JError::handleMessage/1.5|handleMessage]] | ||
|Message error handler | |Message error handler | ||
|- | |- | ||
| + | |public | ||
|[[JError::handleVerbose/1.5|handleVerbose]] | |[[JError::handleVerbose/1.5|handleVerbose]] | ||
|Verbose error handler | |Verbose error handler | ||
|- | |- | ||
| + | |public | ||
|[[JError::isError/1.5|isError]] | |[[JError::isError/1.5|isError]] | ||
|Method to determine if a value is an exception object. | |Method to determine if a value is an exception object. | ||
|- | |- | ||
| + | |public | ||
|[[JError::raise/1.5|raise]] | |[[JError::raise/1.5|raise]] | ||
|Create a new object given the passed arguments. | |Create a new object given the passed arguments. | ||
|- | |- | ||
| + | |public | ||
|[[JError::raiseError/1.5|raiseError]] | |[[JError::raiseError/1.5|raiseError]] | ||
|Wrapper method for the method with predefined error level of E_ERROR and backtrace set to true. | |Wrapper method for the method with predefined error level of E_ERROR and backtrace set to true. | ||
|- | |- | ||
| + | |public | ||
|[[JError::raiseNotice/1.5|raiseNotice]] | |[[JError::raiseNotice/1.5|raiseNotice]] | ||
|Wrapper method for the method with predefined error level of E_NOTICE and backtrace set to false. | |Wrapper method for the method with predefined error level of E_NOTICE and backtrace set to false. | ||
|- | |- | ||
| + | |public | ||
|[[JError::raiseWarning/1.5|raiseWarning]] | |[[JError::raiseWarning/1.5|raiseWarning]] | ||
|Wrapper method for the method with predefined error level of E_WARNING and backtrace set to false. | |Wrapper method for the method with predefined error level of E_WARNING and backtrace set to false. | ||
|- | |- | ||
| + | |public | ||
|[[JError::registerErrorLevel/1.5|registerErrorLevel]] | |[[JError::registerErrorLevel/1.5|registerErrorLevel]] | ||
|Method to register a new error level for handling errors. | |Method to register a new error level for handling errors. | ||
|- | |- | ||
| + | |public | ||
|[[JError::setErrorHandling/1.5|setErrorHandling]] | |[[JError::setErrorHandling/1.5|setErrorHandling]] | ||
|Method to set the way the will handle different error levels. | |Method to set the way the will handle different error levels. | ||
|- | |- | ||
| + | |public | ||
|[[JError::translateErrorLevel/1.5|translateErrorLevel]] | |[[JError::translateErrorLevel/1.5|translateErrorLevel]] | ||
|Translate an error level integer to a human readable string e.g. | |Translate an error level integer to a human readable string e.g. | ||
|- | |- | ||
|} | |} | ||
| + | * '''Defined in''' libraries/joomla/error/error.php | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.error.error' );</source> | <source lang="php">jimport( 'joomla.error.error' );</source> | ||
===See also=== | ===See also=== | ||
| + | * {{JVer|1.5}} '''JError''' on [http://api.joomla.org/Joomla-Framework/Error/JError.html api.joomla.org] | ||
| + | * {{JVer|1.5}} '''JError source code''' on [[jframework15:error/error.php|JoomlaCode]] | ||
| + | * {{JVer|1.5}} Subpackage [[Subpackage Error/1.5|Error]] | ||
| + | * [[JError|Other versions of JError]] | ||
| + | {{SeeAlso:JError}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JError|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JError|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | + | ===User contributed notes=== | |
| − | + | ||
| − | + | ||
| − | === | + | |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 107: | Line 129: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Framework]][[Category:Framework 1.5]][[Category:JError]]</noinclude> | <noinclude>[[Category:Framework]][[Category:Framework 1.5]][[Category:JError]]</noinclude> | ||
Revision as of 18:09, 25 April 2011
JError
Description
JError is inspired in design and concept by patErrorManager [1]. It is Joomla's Error Handling Class and should be used by third party developers to handle errors. [Edit Descripton]
Methods
| Visibility | Method name | Description |
|---|---|---|
| public | attachHandler | Method that attaches the error handler to . |
| public | customErrorHandler | |
| public | detachHandler | Method that dettaches the error handler from . |
| public | customErrorPage | Display a custom error page and exit gracefully. |
| public | getError | Method for retrieving the last exception object in the error stack. |
| public | getErrorHandling | Method to get the current error handler settings for a specified error level. |
| public | getErrors | Method for retrieving the exception stack. |
| public | handleCallback | Callback error handler |
| public | handleDie | Die error handler |
| public | handleEcho | Echo error handler |
| public | handleIgnore | Ignore error handler |
| public | handleLog | Log error handler |
| public | handleMessage | Message error handler |
| public | handleVerbose | Verbose error handler |
| public | isError | Method to determine if a value is an exception object. |
| public | raise | Create a new object given the passed arguments. |
| public | raiseError | Wrapper method for the method with predefined error level of E_ERROR and backtrace set to true. |
| public | raiseNotice | Wrapper method for the method with predefined error level of E_NOTICE and backtrace set to false. |
| public | raiseWarning | Wrapper method for the method with predefined error level of E_WARNING and backtrace set to false. |
| public | registerErrorLevel | Method to register a new error level for handling errors. |
| public | setErrorHandling | Method to set the way the will handle different error levels. |
| public | translateErrorLevel | Translate an error level integer to a human readable string e.g. |
- Defined in libraries/joomla/error/error.php
Importing
jimport( 'joomla.error.error' );
See also
-
JError on api.joomla.org
-
JError source code on JoomlaCode
-
Subpackage Error
- Other versions of JError
SeeAlso:JError [Edit See Also]
User contributed notes
<CodeExamplesForm />