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

From: Date: Sat, 27 Apr 2013 10:58:48 +0000
Subject: Doc #63906 [ReO->Csd]: DateInterval::__construct throws undocumented Exception
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9760@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:             Re-Opened
+Status:             Closed
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        Irrelevant
-Assigned To:        
+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:
------------------------------------------------------------------------
[2013-04-27 10:51:26] salathe@php.net

Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=330157
Log: exception info for dateinterval::__construct() (doc #63906)

------------------------------------------------------------------------
[2013-01-15 19:27:15] salathe@php.net

Re-opening. The bug here is that the DateInterval::construct() manual page has no 
Errors/Exceptions section.

------------------------------------------------------------------------
[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


Thread (5 messages)

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