Source for file exception.php
Documentation is available at exception.php
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Joomla! Exception object.
* @deprecated 12.1 (Platform) & 4.0 (CMS)
* @var string Error level.
* @var string Error code.
* @var string Error message.
* Additional info about the error relevant to the developer,
* for example, if a database connect fails, the dsn used
* Name of the file the error occurred in [Available if backtrace is enabled]
* Line number the error occurred in [Available if backtrace is enabled]
* Name of the method the error occurred in [Available if backtrace is enabled]
* Name of the class the error occurred in [Available if backtrace is enabled]
* @var string Error type.
* Arguments recieved by the method the error occurred in [Available if backtrace is enabled]
protected $args =
array();
* @var mixed Backtrace information.
* - used to set up the error with all needed error details.
* @param string $msg The error message
* @param string $code The error code from the application
* @param integer $level The error level (use the PHP constants E_ALL, E_NOTICE etc.).
* @param string $info Optional: The additional error information.
* @param boolean $backtrace True if backtrace information is to be collected
public function __construct($msg, $code =
0, $level =
null, $info =
null, $backtrace =
false)
JLog::add('JException is deprecated.', JLog::WARNING, 'deprecated');
// Store exception for debugging purposes!
parent::__construct($msg, (int)
$code);
* Returns to error message
* @return string Error message
JLog::add('JException::__toString is deprecated.', JLog::WARNING, 'deprecated');
* Returns to error message
* @return string Error message
JLog::add('JException::toString is deprecated.', JLog::WARNING, 'deprecated');
* Returns a property of the object or the default value if the property is not set.
* @param string $property The name of the property
* @param mixed $default The default value
* @return mixed The value of the property or null
* @see JException::getProperties()
public function get($property, $default =
null)
JLog::add('JException::get is deprecated.', JLog::WARNING, 'deprecated');
if (isset
($this->$property))
* Returns an associative array of object properties
* @param boolean $public If true, returns only the public properties
* @return array Object properties
JLog::add('JException::getProperties is deprecated.', JLog::WARNING, 'deprecated');
foreach ($vars as $key =>
$value)
if ('_' ==
substr($key, 0, 1))
* Get the most recent error message
* @param integer $i Option error index
* @param boolean $toString Indicates if JError objects should return their error message
* @return string Error message
public function getError($i =
null, $toString =
true)
JLog::add('JException::getError is deprecated.', JLog::WARNING, 'deprecated');
// Default, return the last message
$error =
end($this->_errors);
// If $i has been specified but does not exist, return false
$error =
$this->_errors[$i];
// Check if only the string is requested
if ($error instanceof
Exception &&
$toString)
* Return all errors, if any
* @return array Array of error messages or JErrors
JLog::add('JException::getErrors is deprecated.', JLog::WARNING, 'deprecated');
* Modifies a property of the object, creating it if it does not already exist.
* @param string $property The name of the property
* @param mixed $value The value of the property to set
* @return mixed Previous value of the property
* @see JException::setProperties()
public function set($property, $value =
null)
JLog::add('JException::set is deprecated.', JLog::WARNING, 'deprecated');
$previous = isset
($this->$property) ?
$this->$property :
null;
$this->$property =
$value;
* Set the object properties based on a named array/hash
* @param mixed $properties Either and associative array or another object
JLog::add('JException::setProperties is deprecated.', JLog::WARNING, 'deprecated');
$properties = (array)
$properties;
foreach ($properties as $k =>
$v)
* @param string $error Error message
JLog::add('JException::setErrors is deprecated.', JLog::WARNING, 'deprecated');
Documentation generated on Tue, 19 Nov 2013 15:02:41 +0100 by phpDocumentor 1.4.3