Throwable
interface Throwable implements Stringable (View source)
Throwable is the base interface for any object that can be thrown via a throw statement in PHP 7, including Error and Exception.
Methods
string
__toString()
Gets a string representation of the thrown object
string
getMessage()
Gets the message
int
getCode()
Gets the exception code
string
getFile()
Gets the file in which the exception occurred
int
getLine()
Gets the line on which the object was instantiated
array
getTrace()
Gets the stack trace
string
getTraceAsString()
Gets the stack trace as a string
null|Throwable
getPrevious()
Returns the previous Throwable
Details
string
__toString()
Since: 7.0
Gets a string representation of the thrown object
string
getMessage()
Since: 7.0
Gets the message
int
getCode()
Since: 7.0
Gets the exception code
string
getFile()
Since: 7.0
Gets the file in which the exception occurred
int
getLine()
Since: 7.0
Gets the line on which the object was instantiated
array
getTrace()
Since: 7.0
Gets the stack trace
string
getTraceAsString()
Since: 7.0
Gets the stack trace as a string
null|Throwable
getPrevious()
Since: 7.0
Returns the previous Throwable