php8.5
Home/ Manual/ language / predefined/ Exception

Exception

Exception is the base class for all user exceptions.

Intro

Exception is the base class for all user exceptions.

Class synopsis

implements Throwable { }

Properties

message

The exception message

code

The exception code

file

The filename where the exception was created

line

The line where the exception was created

previous

The previously thrown exception

string

The string representation of the stack trace

trace

The stack trace as an array

Construct Getmessage Getprevious Getcode Getfile Getline Gettrace Gettraceasstring Tostring Clone

In this section

Source: language/predefined/exception.xml · from the official PHP manual (php/doc-en)