List of all members.
Detailed Description
Basic Exception class.
- Since:
- PHP 5.0
Definition at line 258 of file spl.php.
Constructor & Destructor Documentation
| Exception::__construct |
( |
$ |
message = NULL, |
|
|
$ |
code = 0 |
|
) |
| |
Construct an exception.
- Parameters:
-
| $message | Some text describing the exception |
| $code | Some code describing the exception |
Definition at line 287 of file spl.php.
References $code, and $message.
{
if (func_num_args()) {
$this->message = $message;
}
$this->code = $code;
$this->file = __FILE__;
$this->line = __LINE__;
$this->trace = debug_backtrace();
$this->string = StringFormat($this);
}
Member Function Documentation
| Exception::__clone |
( |
| ) |
[final, private] |
Prevent clone.
Definition at line 280 of file spl.php.
| Exception::__toString |
( |
| ) |
|
- Returns:
- string represenation of exception
Definition at line 341 of file spl.php.
{
return $this->string;
}
| Exception::getCode |
( |
| ) |
[final] |
- Returns:
- the code passed to the constructor
Definition at line 307 of file spl.php.
| Exception::getFile |
( |
| ) |
[final] |
- Returns:
- the name of the file where the exception was thrown
Definition at line 314 of file spl.php.
| Exception::getLine |
( |
| ) |
[final] |
- Returns:
- the line number where the exception was thrown
Definition at line 321 of file spl.php.
| Exception::getMessage |
( |
| ) |
[final] |
- Returns:
- the message passed to the constructor
Definition at line 300 of file spl.php.
{
return $this->message;
}
| Exception::getTrace |
( |
| ) |
[final] |
- Returns:
- the stack trace as array
Definition at line 328 of file spl.php.
| Exception::getTraceAsString |
( |
| ) |
[final] |
- Returns:
- the stack trace as string
Definition at line 335 of file spl.php.
Member Data Documentation
Exception::$code [protected] |
Exception::$file [protected] |
The file name where the exception was instantiated.
Definition at line 270 of file spl.php.
Exception::$line [protected] |
The line number where the exception was instantiated.
Definition at line 273 of file spl.php.
Exception::$message [protected] |
Exception::$string [private] |
The string represenations as generated during construction.
Definition at line 264 of file spl.php.
Exception::$trace [private] |
The stack trace.
Definition at line 276 of file spl.php.
The documentation for this class was generated from the following file: