mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
Reword parameter description of set_exception_handler (#1004)
This commit is contained in:
parent
214519fdbd
commit
09f4a3f040
1 changed files with 5 additions and 4 deletions
|
@ -30,9 +30,10 @@
|
|||
<listitem>
|
||||
<para>
|
||||
The function to be called when an uncaught exception occurs.
|
||||
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 handler function needs to accept one parameter,
|
||||
which will be the <classname>Throwable</classname> object that was thrown.
|
||||
Both <classname>Error</classname> and <classname>Exception</classname>
|
||||
implement the <classname>Throwable</classname> interface.
|
||||
This is the handler signature:
|
||||
</para>
|
||||
<para>
|
||||
|
@ -66,7 +67,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function exception_handler($exception) {
|
||||
function exception_handler(Throwable $exception) {
|
||||
echo "Uncaught exception: " , $exception->getMessage(), "\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue