- Only modern *object oriented* extensions possibly use exceptions

- Add a tip about the pre-existing SPL exceptions


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269065 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2008-11-15 18:39:46 +00:00
parent 2f092bb815
commit 0976bea995

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<chapter xml:id="language.exceptions" xmlns="http://docbook.org/ns/docbook">
<title>Exceptions</title>
@ -27,12 +27,19 @@
</para>
<note>
<para>
Internal PHP functions mainly use <link
linkend="ini.error-reporting">Error reporting</link>, only modern
Internal PHP functions mainly use
<link linkend="ini.error-reporting">Error reporting</link>, only modern
<link linkend="language.oop5">Object oriented</link>
extensions use exceptions. However, errors can be simply translated to
exceptions with <link linkend="class.errorexception">ErrorException</link>.
</para>
</note>
<tip>
<para>
The <link linkend="intro.spl">Standard PHP Library (SPL)</link> provides a
good number of built-in exceptions.
</para>
</tip>
<example>
<title>Throwing an Exception</title>
<programlisting role="php">