Basic Exception class.
- Since
- PHP 5.0
Definition at line 258 of file spl.php.
| 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.
288 if (func_num_args()) {
292 $this->file = __FILE__;
293 $this->line = __LINE__;
294 $this->trace = debug_backtrace();
295 $this->
string = StringFormat($this);
$code
The code passed to the constructor.
$message
The exception message.
Prevent clone.
Definition at line 280 of file spl.php.
| Exception::__toString |
( |
| ) |
|
- Returns
- string representation of exception
Definition at line 341 of file spl.php.
References $string.
$string
The string representations as generated during construction.
- Returns
- the code passed to the constructor
Definition at line 307 of file spl.php.
References $code.
$code
The code passed to the constructor.
- Returns
- the name of the file where the exception was thrown
Definition at line 314 of file spl.php.
References $file.
$file
The file name where the exception was instantiated.
- Returns
- the line number where the exception was thrown
Definition at line 321 of file spl.php.
References $line.
$line
The line number where the exception was instantiated.
| Exception::getMessage |
( |
| ) |
|
|
final |
- Returns
- the message passed to the constructor
Definition at line 300 of file spl.php.
References $message.
$message
The exception message.
- Returns
- the stack trace as array
Definition at line 328 of file spl.php.
References $trace.
| Exception::getTraceAsString |
( |
| ) |
|
|
final |
- Returns
- the stack trace as string
Definition at line 335 of file spl.php.
The file name where the exception was instantiated.
Definition at line 270 of file spl.php.
Referenced by getFile().
The line number where the exception was instantiated.
Definition at line 273 of file spl.php.
Referenced by getLine().
The string representations as generated during construction.
Definition at line 264 of file spl.php.
Referenced by __toString().
The documentation for this class was generated from the following file: