Error
class Error implements Throwable (View source)
Error is the base class for all internal PHP error exceptions.
Properties
protected | $message | The error message |
|
protected | $code | The error code |
|
protected | $file | The filename where the error happened |
|
protected | $line | The line where the error happened |
Methods
Construct the error object.
Gets the message
Gets the exception code
Gets the file in which the exception occurred
Gets the line on which the object was instantiated
Gets the stack trace
Gets the stack trace as a string
Returns the previous Throwable
Gets a string representation of the thrown object
No description
Details
__construct(string $message = "", int $code = 0, null|Throwable $previous = null)
Construct the error object.
final string
getMessage()
Gets the message
final int
getCode()
Gets the exception code
final string
getFile()
Gets the file in which the exception occurred
final int
getLine()
Gets the line on which the object was instantiated
final array
getTrace()
Gets the stack trace
final string
getTraceAsString()
Gets the stack trace as a string
final null|Throwable
getPrevious()
Returns the previous Throwable
string
__toString()
Gets a string representation of the thrown object
void
__wakeup()
No description