JError: Difference between revisions
From Joomla! Documentation
Layout updates |
Updated to r1448:247ba8d88526 |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
=={{JVer|11.1}} 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 static | |||
|[[JError::addToStack/11.1|addToStack]] | |[[JError::addToStack/11.1|addToStack]] | ||
|Method to add non-JError thrown JExceptions to the stack for debugging purposes. | |Method to add non-JError thrown JExceptions to the stack for debugging purposes. | ||
|- | |- | ||
|public static | |||
|[[JError::attachHandler/11.1|attachHandler]] | |[[JError::attachHandler/11.1|attachHandler]] | ||
|Method that attaches the error handler to . | |Method that attaches the error handler to . | ||
|- | |- | ||
|public static | |||
|[[JError::customErrorHandler/11.1|customErrorHandler]] | |[[JError::customErrorHandler/11.1|customErrorHandler]] | ||
| | | | ||
|- | |- | ||
|public static | |||
|[[JError::customErrorPage/11.1|customErrorPage]] | |[[JError::customErrorPage/11.1|customErrorPage]] | ||
|Display a custom error page and exit gracefully. | |Display a custom error page and exit gracefully. | ||
|- | |- | ||
|public static | |||
|[[JError::detachHandler/11.1|detachHandler]] | |[[JError::detachHandler/11.1|detachHandler]] | ||
|Method that detaches the error handler from . | |Method that detaches the error handler from . | ||
|- | |- | ||
|public static | |||
|[[JError::getError/11.1|getError]] | |[[JError::getError/11.1|getError]] | ||
|Method for retrieving the last exception object in the error stack. | |Method for retrieving the last exception object in the error stack. | ||
|- | |- | ||
|public static | |||
|[[JError::getErrorHandling/11.1|getErrorHandling]] | |[[JError::getErrorHandling/11.1|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 static | |||
|[[JError::getErrors/11.1|getErrors]] | |[[JError::getErrors/11.1|getErrors]] | ||
|Method for retrieving the exception stack. | |Method for retrieving the exception stack. | ||
|- | |- | ||
|public static | |||
|[[JError::handleCallback/11.1|handleCallback]] | |[[JError::handleCallback/11.1|handleCallback]] | ||
|Callback error handler | |Callback error handler | ||
|- | |- | ||
|public static | |||
|[[JError::handleDie/11.1|handleDie]] | |[[JError::handleDie/11.1|handleDie]] | ||
|Die error handler | |Die error handler | ||
|- | |- | ||
|public static | |||
|[[JError::handleEcho/11.1|handleEcho]] | |[[JError::handleEcho/11.1|handleEcho]] | ||
|Echo error handler | |Echo error handler | ||
|- | |- | ||
|public static | |||
|[[JError::handleIgnore/11.1|handleIgnore]] | |[[JError::handleIgnore/11.1|handleIgnore]] | ||
|Ignore error handler | |Ignore error handler | ||
|- | |- | ||
|public static | |||
|[[JError::handleLog/11.1|handleLog]] | |[[JError::handleLog/11.1|handleLog]] | ||
|Log error handler | |Log error handler | ||
|- | |- | ||
|public static | |||
|[[JError::handleMessage/11.1|handleMessage]] | |[[JError::handleMessage/11.1|handleMessage]] | ||
|Message error handler | |Message error handler | ||
|- | |- | ||
|public static | |||
|[[JError::handleVerbose/11.1|handleVerbose]] | |[[JError::handleVerbose/11.1|handleVerbose]] | ||
|Verbose error handler | |Verbose error handler | ||
|- | |- | ||
|public static | |||
|[[JError::isError/11.1|isError]] | |[[JError::isError/11.1|isError]] | ||
|Method to determine if a value is an exception object. | |Method to determine if a value is an exception object. | ||
|- | |- | ||
|public static | |||
|[[JError::raise/11.1|raise]] | |[[JError::raise/11.1|raise]] | ||
|Create a new object given the passed arguments. | |Create a new object given the passed arguments. | ||
|- | |- | ||
|public static | |||
|[[JError::raiseError/11.1|raiseError]] | |[[JError::raiseError/11.1|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 static | |||
|[[JError::raiseNotice/11.1|raiseNotice]] | |[[JError::raiseNotice/11.1|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 static | |||
|[[JError::raiseWarning/11.1|raiseWarning]] | |[[JError::raiseWarning/11.1|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 static | |||
|[[JError::registerErrorLevel/11.1|registerErrorLevel]] | |[[JError::registerErrorLevel/11.1|registerErrorLevel]] | ||
|Method to register a new error level for handling errors. | |Method to register a new error level for handling errors. | ||
|- | |- | ||
|public static | |||
|[[JError::renderBacktrace/11.1|renderBacktrace]] | |[[JError::renderBacktrace/11.1|renderBacktrace]] | ||
| | | | ||
|- | |- | ||
|public static | |||
|[[JError::setErrorHandling/11.1|setErrorHandling]] | |[[JError::setErrorHandling/11.1|setErrorHandling]] | ||
|Method to set the way the will handle different error levels. | |Method to set the way the will handle different error levels. | ||
|- | |- | ||
|public static | |||
|[[JError::throwError/11.1|throwError]] | |[[JError::throwError/11.1|throwError]] | ||
| | | | ||
|- | |- | ||
|public static | |||
|[[JError::translateErrorLevel/11.1|translateErrorLevel]] | |[[JError::translateErrorLevel/11.1|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=== | ||
* JError source code | * {{JVer|11.1}} '''JError source code''' on [[jplatform:error/error.php|BitBucket]] | ||
* [[JError|Other versions of | * {{JVer|11.1}} Subpackage [[Subpackage Error/11.1|Error]] | ||
* [[JError|Other versions of JError]] | |||
{{SeeAlso: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 117: | Line 140: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
namespace=CodeExample | |||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JError]]</noinclude> | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JError]]</noinclude> | ||
Revision as of 23:00, 27 April 2011
JError
Description
Template:Description:JError [Edit Descripton]
Methods
| Visibility | Method name | Description |
|---|---|---|
| public static | addToStack | Method to add non-JError thrown JExceptions to the stack for debugging purposes. |
| public static | attachHandler | Method that attaches the error handler to . |
| public static | customErrorHandler | |
| public static | customErrorPage | Display a custom error page and exit gracefully. |
| public static | detachHandler | Method that detaches the error handler from . |
| public static | getError | Method for retrieving the last exception object in the error stack. |
| public static | getErrorHandling | Method to get the current error handler settings for a specified error level. |
| public static | getErrors | Method for retrieving the exception stack. |
| public static | handleCallback | Callback error handler |
| public static | handleDie | Die error handler |
| public static | handleEcho | Echo error handler |
| public static | handleIgnore | Ignore error handler |
| public static | handleLog | Log error handler |
| public static | handleMessage | Message error handler |
| public static | handleVerbose | Verbose error handler |
| public static | isError | Method to determine if a value is an exception object. |
| public static | raise | Create a new object given the passed arguments. |
| public static | raiseError | Wrapper method for the method with predefined error level of E_ERROR and backtrace set to true. |
| public static | raiseNotice | Wrapper method for the method with predefined error level of E_NOTICE and backtrace set to false. |
| public static | raiseWarning | Wrapper method for the method with predefined error level of E_WARNING and backtrace set to false. |
| public static | registerErrorLevel | Method to register a new error level for handling errors. |
| public static | renderBacktrace | |
| public static | setErrorHandling | Method to set the way the will handle different error levels. |
| public static | throwError | |
| public static | 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 source code on BitBucket
Subpackage Error- Other versions of JError
Template:SeeAlso:JError [Edit See Also]
User contributed notes
<CodeExamplesForm />