Class JException

Description

Joomla! Exception object.

  • deprecated: 12.1 (Platform) & 4.0 (CMS)
  • since: 11.1

Located in /libraries/legacy/exception/exception.php (line 20)

Exception
   |
   --JException
Variable Summary
 array $args
 mixed $backtrace
 string $class
 string $code
 string $file
 string $function
 string $info
 string $level
 int $line
 string $message
 string $type
Method Summary
 JException __construct (string $msg, [string $code = 0], [integer $level = null], [string $info = null], [boolean $backtrace = false])
 mixed get (string $property, [mixed $default = null])
 string getError ([integer $i = null], [boolean $toString = true])
 array getErrors ()
 array getProperties ([boolean $public = true])
 mixed set (string $property, [mixed $value = null])
 void setError (string $error)
 boolean setProperties (mixed $properties)
 string toString ()
 string __toString ()
Variables
array $args = array() (line 93)

Arguments recieved by the method the error occurred in [Available if backtrace is enabled]

  • since: 11.1
  • access: protected
mixed $backtrace = null (line 99)
  • var: Backtrace information.
  • since: 11.1
  • access: protected
string $class = null (line 79)

Name of the class the error occurred in [Available if backtrace is enabled]

  • since: 11.1
  • access: protected
string $code = null (line 32)
  • var: Error code.
  • since: 11.1
  • access: protected

Redefinition of:
Exception::$code
string $file = null (line 55)

Name of the file the error occurred in [Available if backtrace is enabled]

  • since: 11.1
  • access: protected

Redefinition of:
Exception::$file
string $function = null (line 71)

Name of the method the error occurred in [Available if backtrace is enabled]

  • since: 11.1
  • access: protected
string $info = '' (line 47)

Additional info about the error relevant to the developer, for example, if a database connect fails, the dsn used

  • since: 11.1
  • access: protected
string $level = null (line 26)
  • var: Error level.
  • since: 11.1
  • access: protected
int $line = 0 (line 63)

Line number the error occurred in [Available if backtrace is enabled]

  • since: 11.1
  • access: protected

Redefinition of:
Exception::$line
string $message = null (line 38)
  • var: Error message.
  • since: 11.1
  • access: protected

Redefinition of:
Exception::$message
string $type = null (line 85)
  • var: Error type.
  • since: 11.1
  • access: protected

Inherited Variables

Inherited from Exception (Internal Class)

$code
$file
$line
$message
$previous
$string
$trace
Methods
Constructor __construct (line 115)

Constructor

  • used to set up the error with all needed error details.

  • deprecated: 12.1
  • since: 11.1
  • access: public
JException __construct (string $msg, [string $code = 0], [integer $level = null], [string $info = null], [boolean $backtrace = false])
  • string $msg: The error message
  • string $code: The error code from the application
  • integer $level: The error level (use the PHP constants E_ALL, E_NOTICE etc.).
  • string $info: Optional: The additional error information.
  • boolean $backtrace: True if backtrace information is to be collected

Redefinition of:
Exception::constructor __construct ( [$message = ], [$code = ], [$previous = ] )
get (line 214)

Returns a property of the object or the default value if the property is not set.

mixed get (string $property, [mixed $default = null])
  • string $property: The name of the property
  • mixed $default: The default value
getError (line 266)

Get the most recent error message

  • return: Error message
  • deprecated: 12.1
  • since: 11.1
  • access: public
string getError ([integer $i = null], [boolean $toString = true])
  • integer $i: Option error index
  • boolean $toString: Indicates if JError objects should return their error message
getErrors (line 304)

Return all errors, if any

  • return: Array of error messages or JErrors
  • deprecated: 12.1
  • since: 11.1
  • access: public
array getErrors ()
getProperties (line 236)

Returns an associative array of object properties

  • return: Object properties
  • see: JException::get()
  • deprecated: 12.1
  • since: 11.1
  • access: public
array getProperties ([boolean $public = true])
  • boolean $public: If true, returns only the public properties
set (line 323)

Modifies a property of the object, creating it if it does not already exist.

mixed set (string $property, [mixed $value = null])
  • string $property: The name of the property
  • mixed $value: The value of the property to set
setError (line 374)

Add an error message

  • deprecated: 12.1
  • since: 11.1
  • access: public
void setError (string $error)
  • string $error: Error message
setProperties (line 343)

Set the object properties based on a named array/hash

boolean setProperties (mixed $properties)
  • mixed $properties: Either and associative array or another object
toString (line 195)

Returns to error message

  • return: Error message
  • deprecated: 12.1
  • since: 11.1
  • access: public
string toString ()
__toString (line 180)

Returns to error message

  • return: Error message
  • deprecated: 12.1
  • since: 11.1
  • access: public
string __toString ()

Redefinition of:
Exception::__toString ( )

Inherited Methods

Inherited From Exception (Internal Class)

 constructor __construct ( [$message = ], [$code = ], [$previous = ] )
 getCode ( )
 getFile ( )
 getLine ( )
 getMessage ( )
 getPrevious ( )
 getTrace ( )
 getTraceAsString ( )
 __clone ( )
 __toString ( )

Documentation generated on Tue, 19 Nov 2013 15:02:41 +0100 by phpDocumentor 1.4.3