Doc #63906 [Csd->ReO]: DateInterval::__construct throws undocumented Exception

From: Date: Tue, 15 Jan 2013 19:27:15 +0000
Subject: Doc #63906 [Csd->ReO]: DateInterval::__construct throws undocumented Exception
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9406@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63906&edit=1 ID: 63906 Updated by: salathe@php.net Reported by: matt dot patterson at bookit dot com Summary: DateInterval::__construct throws undocumented Exception -Status: Closed +Status: Re-Opened Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: oaass +Assigned To: Block user comment: N Private report: N New Comment: Re-opening. The bug here is that the DateInterval::construct() manual page has no Errors/Exceptions section. Previous Comments: ------------------------------------------------------------------------ [2013-01-14 09:18:50] oaass@php.net You can find documentation for Exception on http://php.net/class.exception ------------------------------------------------------------------------ [2013-01-04 19:16:59] matt dot patterson at bookit dot com Description: ------------ --- From manual page: http://www.php.net/dateinterval.construct#refsect1-dateinterval.construct-parameters --- DateInterval::__construct() throws \Exception when an invalid format is supplied, but this exception is not documented anywhere in the PHP manual. Test script: --------------- <?php try { $di = new DateInterval('PTS'); // Or any other invalid format } catch (Exception $e) { echo $e->getMessage(); } /* * Prints: * DateInterval::__construct() [<a href='dateinterval.--construct'>dateinterval.--construct</a>]: Unknown or bad format (PTS) */ ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63906&edit=1

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