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

Error

Error is the base class for errors that indicate programming mistakes. Such errors generally require a correction to the program rather than being handled during normal operation.

Intro

Error is the base class for errors that indicate programming mistakes. Such errors generally require a correction to the program rather than being handled during normal operation.

Class synopsis

implements Throwable { }

Properties

message

The error message

code

The error code

file

The filename where the error happened

line

The line where the error happened

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/error.xml · from the official PHP manual (php/doc-en)