JException
Extends \ExceptionJoomla! Exception object.
package |
Joomla.Platform |
---|---|
subpackage |
Error |
since |
11.1 |
deprecated |
12.1 |
Methods
__construct
Constructor
- used to set up the error with all needed error details.
__construct(string $msg, string $code, integer $level = null, string $info = null, boolean $backtrace = false)
since |
11.1 |
---|---|
deprecated |
12.1 |
Arguments
- $msg
string
The error message- $code
string
The error code from the application- $level
integer
The error level (use the PHP constants E_ALL, E_NOTICE etc.).- $info
string
Optional: The additional error information.- $backtrace
boolean
True if backtrace information is to be collected
__toString
Returns to error message
__toString() : string
since |
11.1 |
---|---|
deprecated |
12.1 |
Response
string
Error message
get
Returns a property of the object or the default value if the property is not set.
get(string $property, mixed $default = null) : mixed
deprecated |
12.1 |
---|---|
see | \JException::getProperties() |
since |
11.1 |
Arguments
- $property
string
The name of the property- $default
mixed
The default value
Response
mixed
The value of the property or null
getError
Get the most recent error message
getError(integer $i = null, boolean $toString = true) : string
since |
11.1 |
---|---|
deprecated |
12.1 |
Arguments
- $i
integer
Option error index- $toString
boolean
Indicates if JError objects should return their error message
Response
string
Error message
getErrors
Return all errors, if any
getErrors() : array
since |
11.1 |
---|---|
deprecated |
12.1 |
Response
array
Array of error messages or JErrors
getProperties
Returns an associative array of object properties
getProperties(boolean $public = true) : array
deprecated |
12.1 |
---|---|
see | \JException::get() |
since |
11.1 |
Arguments
- $public
boolean
If true, returns only the public properties
Response
array
Object properties
set
Modifies a property of the object, creating it if it does not already exist.
set(string $property, mixed $value = null) : mixed
deprecated |
12.1 |
---|---|
see | \JException::setProperties() |
since |
11.1 |
Arguments
- $property
string
The name of the property- $value
mixed
The value of the property to set
Response
mixed
Previous value of the property
setError
Add an error message
setError(string $error) : void
since |
11.1 |
---|---|
deprecated |
12.1 |
Arguments
- $error
string
Error message
setProperties
Set the object properties based on a named array/hash
setProperties(mixed $properties) : boolean
deprecated |
12.1 |
---|---|
see | \JException::set() |
since |
11.1 |
Arguments
- $properties
mixed
Either and associative array or another object
Response
boolean
toString
Returns to error message
toString() : string
since |
11.1 |
---|---|
deprecated |
12.1 |
Response
string
Error message
Properties
level
Error level.
since |
11.1 |
---|
Type(s)
string
code
Error code.
since |
11.1 |
---|
Type(s)
string
message
Error message.
since |
11.1 |
---|
Type(s)
string
info
Additional info about the error relevant to the developer, for example, if a database connect fails, the dsn used
since |
11.1 |
---|
Type(s)
string
file
Name of the file the error occurred in [Available if backtrace is enabled]
since |
11.1 |
---|
Type(s)
string
line
Line number the error occurred in [Available if backtrace is enabled]
since |
11.1 |
---|
Type(s)
integer
function
Name of the method the error occurred in [Available if backtrace is enabled]
since |
11.1 |
---|
Type(s)
string
class
Name of the class the error occurred in [Available if backtrace is enabled]
since |
11.1 |
---|
Type(s)
string
type
Error type.
since |
11.1 |
---|
Type(s)
string
args
Arguments recieved by the method the error occurred in [Available if backtrace is enabled]
since |
11.1 |
---|
Type(s)
array
backtrace
Backtrace information.
since |
11.1 |
---|
Type(s)
mixed