Joomla! 1.5 API

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2011 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JException

Description

Joomla! Exception object.

  • since: 1.5

Located in /joomla/error/exception.php (line 25)

Class JObject   (Subpackage Base)

Class JException   (Subpackage Error)
Variable Summary
Variable array $args
Variable mixed $backtrace
Variable string $class
Variable string $code
Variable string $file
Variable string $function
Variable string $info
Variable string $level
Variable int $line
Variable string $message
Variable string $type
Method Summary
Constructor JException __construct (string $msg, [string $code = 0], [int $level = null], [string $info = null], [boolean $backtrace = false])
Method integer getCode ()
Method string getFile ()
Method integer getLine ()
Method string getMessage ()
Method array getTrace ()
Method string getTraceAsString ()
Method string toString ()
Variables
array $args = array() (line 86)

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

mixed $backtrace = null (line 92)

Backtrace information

string $class = null (line 74)

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

string $code = null (line 37)

Error code

string $file = null (line 56)

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

string $function = null (line 68)

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

string $info = '' (line 50)

Additional info about the error relevant to the developer

  • e.g. if a database connect fails, the dsn used

string $level = null (line 31)

Error level

int $line = 0 (line 62)

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

string $message = null (line 43)

Error message

string $type = null (line 80)

Error type

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 105)

Constructor

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

  • access: protected
JException __construct (string $msg, string $code, [int $level = null], [string $info = null], [boolean $backtrace = false])
  • string $msg: The error message
  • string $code: The error code from the application
  • int $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:
JObject::__construct()
Class constructor, overridden in descendant classes.
getCode (line 168)

Method to get the exception code

  • final:
  • since: 1.5
  • access: public
integer getCode ()
getFile (line 181)

Method to get the source filename where the exception occured

  • final:
  • since: 1.5
  • access: public
string getFile ()
getLine (line 194)

Method to get the source line where the exception occured

  • final:
  • since: 1.5
  • access: public
integer getLine ()
getMessage (line 155)

Method to get the exception message

  • final:
  • since: 1.5
  • access: public
string getMessage ()
getTrace (line 207)

Method to get the array of the backtrace()

  • return: backtrace
  • final:
  • since: 1.5
  • access: public
array getTrace ()
getTraceAsString (line 226)

Method to get the formatted backtrace information

  • return: Formated string of trace
  • final:
  • since: 1.5
  • access: public
string getTraceAsString ()
toString (line 248)

Returns to error message

  • return: Error message
  • since: 1.5
  • access: public
string toString ()

Redefinition of:
JObject::toString()
Object-to-string conversion.

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()
Support Joomla!