Doc #63158 [Asn->Csd]: Misleading Example of ErrorException::getSeverity()

From: Date: Thu, 19 May 2016 20:47:59 +0000
Subject: Doc #63158 [Asn->Csd]: Misleading Example of ErrorException::getSeverity()
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13456@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63158&edit=1 ID: 63158 Updated by: salathe@php.net Reported by: xianrenb at gmail dot com Summary: Misleading Example of ErrorException::getSeverity() -Status: Assigned +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Assigned To: salathe Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2016-05-19 20:47:25] salathe@php.net Automatic comment from SVN on behalf of salathe Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=339185 Log: Tie together ErrorException severity and error constants (doc #63158) ------------------------------------------------------------------------ [2015-01-16 19:59:34] salathe@php.net Assigning to myself, to get this "severity" issue sorted out once and for all. ------------------------------------------------------------------------ [2013-01-20 01:10:35] xianrenb at gmail dot com Related To: Bug #63157 ------------------------------------------------------------------------ [2013-01-20 01:01:27] xianrenb at gmail dot com 75 = 64 + 8 + 2 + 1 Therefore, under common/practical usage, the current example <?php try { throw new ErrorException("Exception message", 0, 75); } catch(ErrorException $e) { echo "This exception severity is: " . $e->getSeverity(); } ?> is equivalent to <?php try { throw new ErrorException("Exception message", 0, E_CORE_ERROR | E_NOTICE | E_WARNING | E_ERROR); } catch(ErrorException $e) { echo "This exception severity is: " . $e->getSeverity(); } ?> Would anyone think it is possible or useful to do so? ------------------------------------------------------------------------ [2013-01-20 00:42:39] xianrenb at gmail dot com Bug closed without a proper reason again? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=63158 -- Edit this bug report at https://bugs.php.net/bug.php?id=63158&edit=1

« previous php.doc.bugs (#13456) next »