|
static | isError ($object) |
|
static | getError ($unset=false) |
|
static | getErrors () |
|
static | addToStack (JException $e) |
|
static | raise ($level, $code, $msg, $info=null, $backtrace=false) |
|
static | throwError (&$exception) |
|
static | raiseError ($code, $msg, $info=null) |
|
static | raiseWarning ($code, $msg, $info=null) |
|
static | raiseNotice ($code, $msg, $info=null) |
|
static | getErrorHandling ($level) |
|
static | setErrorHandling ($level, $mode, $options=null) |
|
static | attachHandler () |
|
static | detachHandler () |
|
static | registerErrorLevel ($level, $name, $handler='ignore') |
|
static | translateErrorLevel ($level) |
|
static | handleIgnore (&$error, $options) |
|
static | handleEcho (&$error, $options) |
|
static | handleVerbose (&$error, $options) |
|
static | handleDie (&$error, $options) |
|
static | handleMessage (&$error, $options) |
|
static | handleLog (&$error, $options) |
|
static | handleCallback (&$error, $options) |
|
static | customErrorPage ($error) |
|
static | customErrorHandler ($level, $msg) |
|
static | renderBacktrace ($error) |
|
|
static | $levels = array(E_NOTICE => 'Notice', E_WARNING => 'Warning', E_ERROR => 'Error') |
|
static | $handlers |
|
static | $stack = array() |
|
Error Handling Class
This class is inspired in design and concept by patErrorManager http://www.php-tools.net
patErrorManager contributors include:
- Depuis
- 1.5
- Obsolète:
- 4.0 Will be removed without replacement
◆ addToStack()
◆ attachHandler()
Method that attaches the error handler to JError
- Renvoie
- void
- Depuis
- 1.5
- Obsolète:
- 4.0
- Voir également
- set_error_handler
◆ customErrorHandler()
static customErrorHandler |
( |
|
$level, |
|
|
|
$msg |
|
) |
| |
|
static |
Display a message to the user
- Paramètres
-
integer | $level | The error level - use any of PHP's own error levels for this: E_ERROR, E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE. |
string | $msg | Error message, shown to user if need be. |
- Renvoie
- void
- Depuis
- 1.5
- Obsolète:
- 4.0 Throw an Exception or enqueue the message to the application, eg. ::getApplication()->enqueueMessage($msg)
◆ customErrorPage()
static customErrorPage |
( |
|
$error | ) |
|
|
static |
◆ detachHandler()
Method that detaches the error handler from JError
- Renvoie
- void
- Depuis
- 1.5
- Obsolète:
- 4.0
- Voir également
- restore_error_handler
◆ getError()
static getError |
( |
|
$unset = false | ) |
|
|
static |
Method for retrieving the last exception object in the error stack
- Paramètres
-
boolean | $unset | True to remove the error from the stack. |
- Renvoie
- JException|boolean Last JException object in the error stack or boolean false if none exist
- Depuis
- 1.5
- Obsolète:
- 4.0
Référencé par PlgSystemDebug\displayErrors().
◆ getErrorHandling()
static getErrorHandling |
( |
|
$level | ) |
|
|
static |
Method to get the current error handler settings for a specified error level.
- Paramètres
-
integer | $level | The error level to retrieve. This can be any of PHP's own error levels, e.g. E_ALL, E_NOTICE... |
- Renvoie
- array All error handling details
- Depuis
- 1.5
- Obsolète:
- 4.0
◆ getErrors()
◆ handleCallback()
static handleCallback |
( |
& |
$error, |
|
|
|
$options |
|
) |
| |
|
static |
Callback error handler
- Send the error object to a callback method for error handling
- Paramètres
-
JException | &$error | Exception object to handle |
array | $options | Handler options |
- Renvoie
- JException The exception object
- Depuis
- 1.5
- Obsolète:
- 4.0
- Voir également
- JError::raise()
Références $options.
◆ handleDie()
static handleDie |
( |
& |
$error, |
|
|
|
$options |
|
) |
| |
|
static |
Die error handler
- Echos the error message to output and then dies
- Paramètres
-
JException | &$error | Exception object to handle |
array | $options | Handler options |
- Renvoie
- void Calls die()
- Depuis
- 1.5
- Obsolète:
- 4.0
- Voir également
- JError::raise()
◆ handleEcho()
static handleEcho |
( |
& |
$error, |
|
|
|
$options |
|
) |
| |
|
static |
◆ handleIgnore()
static handleIgnore |
( |
& |
$error, |
|
|
|
$options |
|
) |
| |
|
static |
◆ handleLog()
static handleLog |
( |
& |
$error, |
|
|
|
$options |
|
) |
| |
|
static |
◆ handleMessage()
static handleMessage |
( |
& |
$error, |
|
|
|
$options |
|
) |
| |
|
static |
Message error handler Enqueues the error message into the system queue
- Paramètres
-
JException | &$error | Exception object to handle |
array | $options | Handler options |
- Renvoie
- JException The exception object
- Depuis
- 1.5
- Obsolète:
- 4.0
- Voir également
- JError::raise()
Références $type.
◆ handleVerbose()
static handleVerbose |
( |
& |
$error, |
|
|
|
$options |
|
) |
| |
|
static |
Verbose error handler
- Echos the error message to output as well as related info
- Paramètres
-
JException | &$error | Exception object to handle |
array | $options | Handler options |
- Renvoie
- JException The exception object
- Depuis
- 1.5
- Obsolète:
- 4.0
- Voir également
- JError::raise()
Références $info, et null.
◆ isError()
static isError |
( |
|
$object | ) |
|
|
static |
Method to determine if a value is an exception object.
- Paramètres
-
mixed | $object | Object to check. |
- Renvoie
- boolean True if argument is an exception, false otherwise.
- Depuis
- 1.5
- Obsolète:
- 4.0
◆ raise()
static raise |
( |
|
$level, |
|
|
|
$code, |
|
|
|
$msg, |
|
|
|
$info = null , |
|
|
|
$backtrace = false |
|
) |
| |
|
static |
Create a new JException object given the passed arguments
- Paramètres
-
integer | $level | The error level - use any of PHP's own error levels for this: E_ERROR, E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE. |
string | $code | The application-internal error code for this error |
string | $msg | The error message, which may also be shown the user if need be. |
mixed | $info | Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN). |
boolean | $backtrace | Add a stack backtrace to the exception. |
- Renvoie
- JException
- Depuis
- 1.5
- Obsolète:
- 4.0
- Voir également
- JException
Références $info.
◆ raiseError()
static raiseError |
( |
|
$code, |
|
|
|
$msg, |
|
|
|
$info = null |
|
) |
| |
|
static |
Wrapper method for the raise() method with predefined error level of E_ERROR and backtrace set to true.
- Paramètres
-
string | $code | The application-internal error code for this error |
string | $msg | The error message, which may also be shown the user if need be. |
mixed | $info | Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN). |
- Renvoie
- JException $error The thrown JException object
- Depuis
- 1.5
- Obsolète:
- 4.0 Just throw an Exception
- Voir également
- JError::raise()
Références $info.
Référencé par UsersControllerRegistration\activate(), UsersControllerGroups\checkin(), BannersModelBanner\click(), CategoryView\commonCategoryDisplay(), UsersControllerGroups\delete(), UsersControllerLevel\delete(), ContenthistoryViewPreview\display(), MessagesViewMessages\display(), UsersViewRemind\display(), UsersViewReset\display(), UsersViewLogin\display(), UsersViewRegistration\display(), UsersViewProfile\display(), NewsfeedsViewNewsfeeds\display(), MenusViewItem\display(), ContentController\display(), ActionlogsViewActionlogs\display(), FinderViewSearch\display(), FinderViewIndex\display(), NewsfeedsModelNewsfeed\getItem(), ContentModelArticle\getItem(), ContactModelContact\getItem(), TagsModelTag\getItem(), ModLatestHelper\getList(), ModPopularHelper\getList(), TagsModelTag\hit(), BannersModelBanners\impress(), MailtoModelMailto\loadFormData(), UsersRouterRulesLegacy\parse(), ContentRouterRulesLegacy\parse(), UsersControllerGroups\publish(), FOFIntegrationJoomlaPlatform\raiseError(), UsersControllerRegistration\register(), UsersControllerGroups\reorder(), MessagesControllerConfig\save(), MenusControllerMenu\save(), UsersControllerProfile\save(), MenusControllerItem\save(), UsersControllerGroups\saveorder(), MailtoController\send(), et ContactControllerContact\submit().
◆ raiseNotice()
static raiseNotice |
( |
|
$code, |
|
|
|
$msg, |
|
|
|
$info = null |
|
) |
| |
|
static |
Wrapper method for the raise() method with predefined error level of E_NOTICE and backtrace set to false.
- Paramètres
-
string | $code | The application-internal error code for this error |
string | $msg | The error message, which may also be shown the user if need be. |
mixed | $info | Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN). |
- Renvoie
- JException $error The thrown JException object
- Depuis
- 1.5
- Obsolète:
- 4.0 Use ::getApplication()->enqueueMessage($msg, 'notice') when wou want to notify the UI
- Voir également
- JError::raise()
Références $info.
Référencé par admin_postinstall_eaccelerator_action(), behindproxy_postinstall_action(), JFormFieldUserMessages\getGroups(), FOFFormFieldRules\getInput25(), InstallerModelManage\publish(), CategoriesModelCategory\save(), MenusModelItem\save(), MailtoController\send(), Mail\Send(), et MenusModelItem\setHome().
◆ raiseWarning()
static raiseWarning |
( |
|
$code, |
|
|
|
$msg, |
|
|
|
$info = null |
|
) |
| |
|
static |
Wrapper method for the raise() method with predefined error level of E_WARNING and backtrace set to false.
- Paramètres
-
string | $code | The application-internal error code for this error |
string | $msg | The error message, which may also be shown the user if need be. |
mixed | $info | Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN). |
- Renvoie
- JException $error The thrown JException object
- Depuis
- 1.5
- Obsolète:
- 4.0 Use ::getApplication()->enqueueMessage($msg, 'warning') when wou want to notify the UI
- Voir également
- JError::raise()
Références $info.
Référencé par JoomlaupdateControllerUpdate\_applyCredentials(), PlgContentJoomla\_countItemsInCategory(), PlgContentJoomla\_countItemsInChildren(), InstallerModelInstall\_getPackageFromFolder(), InstallerModelInstall\_getPackageFromUpload(), InstallerModelInstall\_getPackageFromUrl(), JArchiveTar\_getTarInfo(), RedirectControllerLinks\activate(), UsersControllerUsers\activate(), UsersModelUser\activate(), ModulesControllerModule\add(), JoomlaupdateModelDefault\applyUpdateSite(), MediaControllerFile\authoriseUser(), UsersModelUser\block(), UsersControllerUsers\changeBlock(), JHtmlBanner\clientlist(), MediaControllerFolder\create(), ContenthistoryControllerHistory\delete(), MediaControllerFolder\delete(), UsersControllerLevel\delete(), TemplatesModelStyle\delete(), BannersModelTracks\delete(), UsersModelGroup\delete(), MediaControllerFile\delete(), ModulesModelModule\delete(), UsersModelUser\delete(), MediaViewMediaList\display(), ContentViewArticle\display(), ContentViewForm\display(), NewsfeedsViewNewsfeed\display(), ContentViewFeatured\display(), ContactViewContact\display(), ContactViewFeatured\display(), TemplatesControllerStyles\duplicate(), ModulesControllerModules\duplicate(), ModulesModelModule\duplicate(), RedirectControllerLinks\duplicateUrls(), PluginsHelper\elementOptions(), JArchiveTar\extract(), PluginsHelper\folderOptions(), ConfigModelModules\getActivePositions(), BannersHelper\getClientOptions(), RedisStorage\getConnection(), FieldsHelper\getFieldsPluginId(), FinderHelper\getFinderPluginId(), JFormFieldPluginInfo\getInput(), JFormFieldModal_Category\getInput(), JFormFieldModal_Contact\getInput(), JFormFieldModal_Article\getInput(), JFormFieldModal_Newsfeed\getInput(), JFormFieldModal_Menu\getInput(), AssociationsHelper\getLanguagefilterPluginId(), MenusHelper\getMenuLinks(), JFormFieldNewsfeeds\getOptions(), JFormFieldMenuParent\getOptions(), JFormFieldCategoryParent\getOptions(), JFormFieldMenuOrdering\getOptions(), JFormFieldContentTypes\getOptions(), JFormFieldCategoryEdit\getOptions(), ModulesHelper\getPositions(), PrivacyHelper\getPrivacyConsentPluginId(), RedirectHelper\getRedirectPluginId(), InstallerModelUpdate\install(), ContenthistoryControllerHistory\keep(), JApplication\login(), JHtmlFinder\mapslist(), PlgContentJoomla\onContentBeforeDelete(), PlgUserContactCreator\onUserAfterSave(), ModulesControllerModule\orderPosition(), JHtmlModules\positionList(), FOFUtilsInstallscript\preflight(), InstallerModelManage\publish(), MenusModelItem\publish(), JArchiveBzip2\raiseWarning(), JArchiveGzip\raiseWarning(), JArchiveZip\raiseWarning(), MenusModelItem\rebuild(), InstallerModelManage\remove(), SearchControllerSearches\reset(), MenusControllerMenus\resync(), ModulesModelModule\save(), UsersModelLevels\saveorder(), MailtoController\send(), ActionlogsModelActionlog\sendNotificationEmails(), ClientHelper\setCredentialsFromRequest(), TemplatesControllerStyles\setDefault(), MenusControllerItems\setDefault(), MenusModelItem\setHome(), ContentModelArticle\storeVote(), ContactControllerContact\submit(), LanguagesModelInstalled\switchAdminLanguage(), TemplatesControllerStyles\unsetDefault(), et MediaControllerFile\upload().
◆ registerErrorLevel()
static registerErrorLevel |
( |
|
$level, |
|
|
|
$name, |
|
|
|
$handler = 'ignore' |
|
) |
| |
|
static |
Method to register a new error level for handling errors
This allows you to add custom error levels to the built-in
- E_NOTICE
- E_WARNING
- E_NOTICE
- Paramètres
-
integer | $level | Error level to register |
string | $name | Human readable name for the error level |
string | $handler | Error handler to set for the new error level [optional] |
- Renvoie
- boolean True on success; false if the level already has been registered
- Depuis
- 1.5
- Obsolète:
- 4.0
Références $name.
◆ renderBacktrace()
static renderBacktrace |
( |
|
$error | ) |
|
|
static |
Render the backtrace
- Paramètres
-
- Renvoie
- string Contents of the backtrace
- Depuis
- 1.6
- Obsolète:
- 4.0 Use JLayoutHelper::render('joomla.error.backtrace', array('backtrace' => $error->getTrace())) instead
◆ setErrorHandling()
static setErrorHandling |
( |
|
$level, |
|
|
|
$mode, |
|
|
|
$options = null |
|
) |
| |
|
static |
◆ throwError()
static throwError |
( |
& |
$exception | ) |
|
|
static |
◆ translateErrorLevel()
static translateErrorLevel |
( |
|
$level | ) |
|
|
static |
Translate an error level integer to a human readable string e.g. E_ERROR will be translated to 'Error'
- Paramètres
-
integer | $level | Error level to translate |
- Renvoie
- string|boolean Human readable error level name or boolean false if it doesn't exist
- Depuis
- 1.5
- Obsolète:
- 4.0
◆ $handlers
Valeur initiale := array(
E_NOTICE => array('mode' => 'ignore'),
E_WARNING => array('mode' => 'ignore'),
E_ERROR => array('mode' => 'ignore'),
)
◆ $legacy
◆ $levels
$levels = array(E_NOTICE => 'Notice', E_WARNING => 'Warning', E_ERROR => 'Error') |
|
staticprotected |
◆ $stack
La documentation de cette classe a été générée à partir du fichier suivant :