RE: [PHP-DEV] Error handling brainstorming
| From: | Laupretre François | Date: | Tue, 28 Aug 2012 10:43:07 +0000 |
| Subject: | RE: [PHP-DEV] Error handling brainstorming | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-62572@lists.php.net to get a copy of this message | ||
> De : nicolas.grekas@gmail.com [mailto:nicolas.grekas@gmail.com
> Envoyé : vendredi 24 août 2012 09:24
>
> > 1) PHP Errors come with a severity code and a string message. You
> want
> > to handle specific errors in a specific way? You better start writing
> > giant regexes parsing the string messages.
> >
> This is a problem that could also be addressed with the current error
> handling mechanism: that would require that any error comes with some
> unique number for example. Is this possible? Independently of the
> exception vs classical error discussion, that would be amazing.
+1 on error msg numbering. Such an error ID would contain at least two parts, one identifying the
code block the error was generating from ('core' or extension name), and a number unique
in this context. So, each extension writer could manage its own error numbering space.