com doc/ja: Clarify that Exception::getPrevious may return a Throwable: language/predefined/exception/getprevious.xml
| From: | Yoshinari Takaoka | Date: | Wed, 24 Mar 2021 18:32:26 +0000 |
| Subject: | com doc/ja: Clarify that Exception::getPrevious may return a Throwable: language/predefined/exception/getprevious.xml | ||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-6275@lists.php.net to get a copy of this message | ||
Commit: 89fb583af538e3abf437a17d35de1bb33ebc2a7c
Author: Yoshinari Takaoka <mumumu@mumumu.org> Thu, 25 Mar 2021 03:32:26 +0900
Parents: 3b2000e744eb9db8b6a381a4fc976b67edfe8103
Branches: master
Link: http://git.php.net/?p=doc/ja.git;a=commitdiff;h=89fb583af538e3abf437a17d35de1bb33ebc2a7c
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 b387762a79..66f9e12e75 100644
--- a/language/predefined/exception/getprevious.xml
+++ b/language/predefined/exception/getprevious.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 6a89105fdc8fc94d843567c3738925289ef3a499 Maintainer: takagi Status: ready
-->
+<!-- EN-Revision: 175b731219b1175cb4368ad182713fe31a610668 Maintainer: takagi Status: ready
-->
<!-- Credits: mumumu -->
<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>前の例外を返す</refpurpose>
+ <refpurpose>前の例外(Throwable)を返す</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -16,7 +16,7 @@
<void />
</methodsynopsis>
<para>
- 前に発生した例外 (<methodname>Exception::__construct</methodname> の 3
番目の引数)
+ 前に発生した <classname>Throwable</classname>
(<methodname>Exception::__construct</methodname> に渡された 3 番目の引数)
を返します。
</para>
</refsect1>