[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] com doc/en: Clarify that Exception::getPrevious may return a Throwable: language/predefine
From: Christoph Michael Becker <cmb () php ! net>
Date: 2021-03-23 13:07:21
Message-ID: php-mail-57c411fb2d106588849f2291bd1c18da1129105531 () git ! php ! net
[Download RAW message or body]
Commit: 175b731219b1175cb4368ad182713fe31a610668
Author: Mike Lehan <mike@m1ke.me> Thu, 25 Feb 2021 15:19:19 +0000
Committer: Christoph M. Becker <cmbecker69@gmx.de> Tue, 23 Mar 2021 14:07:21 \
+0100
Parents: 4f006f632a373421bf92c1da071cf13dc51b6488
Branches: master
Link: http://git.php.net/?p=doc/en.git;a=commitdiff;h=175b731219b1175cb4368ad182713fe31a610668
Log:
Clarify that Exception::getPrevious may return a Throwable
Spotted this when using PhpStorm's documentation which incorrectly typehints an \
Exception - use of this as Exception could cause a TypeError if a non-Exception \
Throwable is returned.
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Closes GH-463.
Changed paths:
M language/predefined/exception/getprevious.xml
Diff:
diff --git a/language/predefined/exception/getprevious.xml \
b/language/predefined/exception/getprevious.xml index 8808825634..a27bf479c1 100644
--- a/language/predefined/exception/getprevious.xml
+++ b/language/predefined/exception/getprevious.xml
@@ -4,7 +4,7 @@
<refentry xml:id="exception.getprevious" xmlns="http://docbook.org/ns/docbook" \
xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv>
<refname>Exception::getPrevious</refname>
- <refpurpose>Returns previous Exception</refpurpose>
+ <refpurpose>Returns previous Throwable</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -14,7 +14,8 @@
<void />
</methodsynopsis>
<para>
- Returns previous exception (the third parameter of \
<methodname>Exception::__construct</methodname>). + Returns previous \
<classname>Throwable</classname> + (which had been passed as the third parameter of \
<methodname>Exception::__construct</methodname>). </para>
</refsect1>
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic