Re: [Vote] More Appropriate Date/Time Exceptions

From: Date: Fri, 16 Dec 2022 21:34:16 +0000
Subject: Re: [Vote] More Appropriate Date/Time Exceptions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-119180@lists.php.net to get a copy of this message
On Thu, Dec 15, 2022 at 8:27 AM Derick Rethans <derick@php.net> wrote: > Hi, > > I've just opened the vote for "More Appropriate Date/Time Exceptions". > It runs until December 31st, 24:00 UTC. > > You can vote at: > https://wiki.php.net/rfc/datetime-exceptions#voting Hi Derick, Thank you for your work on this. I like the idea of having more specific exceptions to avoid having to parse generic exception/warning strings. However, I voted No because there doesn't seem to be an implementation currently, and I'm concerned about introducing differences in error handling between the procedural and object-oriented date functions. Is there a rational for why the procedural date functions should continue producing generic warnings/exceptions, rather than consistently using the same exception hierarchy as the OO interface? I fear this could make it harder for users to switch between the procedural and OO APIs, as some errors might have to be handled in a different way. Also, could maintaining parity between the procedural/OO APIs be more difficult if they each implement error handling differently? Perhaps I'm mistaken, but I thought that currently the procedural date functions are simple aliases of the corresponding object method. Best regards, Theodore

« previous php.internals (#119180) next »