Table of Contents

raise

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Utilities Class JError Method raise Reference raise() Never Work in Progress

Creates a new patError object given the specified information.

Syntax

mixed &raise ( $level, $code, $msg, $info )

$level int is an integer containing 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.
$code string is a string containing the application-internal error code for this error.
$msg string is a string containing the error message, which may also be shown the user if need be.
$info mixed is a variable containing additional error information. This should usually only be developer-relevant information that the user should not see (i.e. a database DSN). This parameter is optional and if omitted defaults to null.

Examples

Example

JError::raise( E_NOTICE, '6000', 'File access error!' );

might produce:

Result

jos-Notice: File access error!