Error Handling
Table of Contents
Errors are a normal part of the development and life cycle of an application. As such, PHP provides multiple ways to report and deal with errors.
PHP has two main mechanisms for reporting errors:
-
Throwable errors, which are further split into programming errors via the Error class hierarchy and recoverable errors via the Exception class hierarchy. These errors can be thrown with the
throwkeyword and caught with thecatchkeyword. -
Diagnostic errors, which are classified into different severities.
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
