Table of Contents

raiseError

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

This is a wrapper for the raise method that passes E_ERROR as the error level. A patError object will be returned.

Syntax

object &raiseError ( $code, $msg, $info )

$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::setErrorHandling( E_ALL, 'echo' );
JError::raiseError( '6000', 'File access error!' );

might produce:

Result

jos-Error: File access error!