\JException
Joomla! Exception object.
Synopsis
class JException
extends Exception
{
- // members
- protected $level;
- protected $code;
- protected $message;
- protected $info;
- protected $file;
- protected $line;
- protected $function;
- protected $class;
- protected $type;
- protected $args;
- protected $backtrace;
- // Inherited members from Exception
- protected $message;
- protected $code;
- protected $file;
- protected $line;
- // methods
- public void __construct()
- public string __toString()
- public string toString()
- public mixed get()
- public array getProperties()
- public string getError()
- public array getErrors()
- public mixed set()
- public boolean setProperties()
- public void setError()
- // Inherited methods from Exception
- public void __construct()
- public final string getMessage()
- public final Exception getPrevious()
- public final mixed getCode()
- public final string getFile()
- public final int getLine()
- public final array getTrace()
- public final string getTraceAsString()
- public string __toString()
Hierarchy
Extends
Members
protected
- $args
—
array
Arguments recieved by the method the error occurred in [Available if backtrace is enabled] - $backtrace — mixed
- $class
—
string
Name of the class the error occurred in [Available if backtrace is enabled] - $code — string
- $code
—
int
The exception code - $file
—
string
Name of the file the error occurred in [Available if backtrace is enabled] - $file
—
string
The filename where the exception was created - $function
—
string
Name of the method the error occurred in [Available if backtrace is enabled] - $info
—
string
Additional info about the error relevant to the developer, for example, if a database connect fails, the dsn used - $level — string
- $line
—
int
Line number the error occurred in [Available if backtrace is enabled] - $line
—
int
The line where the exception was created - $message — string
- $message
—
string
The exception message - $type — string
Methods
public
- __construct() — Constructor - used to set up the error with all needed error details.
- __toString() — Returns to error message
- get() — Returns a property of the object or the default value if the property is not set.
- getError() — Get the most recent error message
- getErrors() — Return all errors, if any
- getProperties() — Returns an associative array of object properties
- set() — Modifies a property of the object, creating it if it does not already exist.
- setError() — Add an error message
- setProperties() — Set the object properties based on a named array/hash
- toString() — Returns to error message
Inherited from Exception
public
- __toString() — String representation of the exception
- getCode() — Gets the Exception code
- getFile() — Gets the file in which the exception occurred
- getLine() — Gets the line in which the exception occurred
- getMessage() — Gets the Exception message
- getPrevious() — Returns previous Exception
- getTrace() — Gets the stack trace
- getTraceAsString() — Gets the stack trace as a string