svn: /phpdoc/en/trunk/reference/errorfunc/functions/ set-exception-handler.xml
| From: | Christoph Michael Becker | Date: | Fri, 28 Aug 2015 12:39:57 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/errorfunc/functions/ set-exception-handler.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13667@lists.php.net to get a copy of this message | ||
cmb Fri, 28 Aug 2015 12:39:57 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337661
Log:
PHP7 update (contributed by jhdxr)
Changed paths:
U phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml
Modified: phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml
===================================================================
--- phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml 2015-08-28 12:36:58 UTC
(rev 337660)
+++ phpdoc/en/trunk/reference/errorfunc/functions/set-exception-handler.xml 2015-08-28 12:39:57 UTC
(rev 337661)
@@ -32,7 +32,7 @@
Name of the function to be called when an uncaught exception occurs.
This handler function
needs to accept one parameter, which will be the exception object that
- was thrown. This is the handler signature:
+ was thrown. This is the handler signature before PHP 7:
</para>
<para>
<methodsynopsis>
@@ -41,6 +41,18 @@
</methodsynopsis>
</para>
<para>
+ Since PHP 7, most errors are reported by throwing <classname>Error</classname>
+ exceptions, which will be caught by the handler as well. Both
<classname>Error</classname>
+ and <classname>Exception</classname> implements the
<classname>Throwable</classname> interface.
+ This is the handler signature since PHP 7:
+ </para>
+ <para>
+ <methodsynopsis>
+
<type>void</type><methodname><replaceable>handler</replaceable></methodname>
+
<methodparam><type>Throwable</type><parameter>ex</parameter></methodparam>
+ </methodsynopsis>
+ </para>
+ <para>
&null; may be passed instead, to reset this handler to its default state.
</para>
<caution>
@@ -77,6 +89,13 @@
</thead>
<tbody>
<row>
+ <entry>7.0.0</entry>
+ <entry>
+ The type of parameter passed into <parameter>exception_handler</parameter>
changed
+ from <classname>Exception</classname> to
<classname>Throwable</classname>
+ </entry>
+ </row>
+ <row>
<entry>5.5.0</entry>
<entry>
Previously, if &null; was passed then this function returned &true;.