Hi! Although I'm new here and I know I'm about to stir up a hornets' nest, please allow me to introduce another error/exception proposal.
The problem for me as a php end-user currently is, that no coherent error behaviour in php exists. Core functions only issue errors, intl eg. suppresses all errors (if not enabled), pdo allows suppressing errors, exceptions and errors - but only of level E_WARNING. Whether I prefer suppressing errors, errors or exceptions, I always run into problems: - If I prefer suppressing errors, I cannot do so with any granularity; always setting an resetting the error reporting functions is cumbersome and messy (error-prone). - If I prefer errors, I have to take care of extensions that default on suppressing them (like intl) with probably different methods of enabling errors (ini or per object or...) and frankly, I cannot count on the error level. - If I prefer exceptions, much of php doesn't support them at all and extensions might have different facilities to enable them. ErrorException is not really a solution, as exception information (exception class, previous exception) is lost. I therefore propose to let the *user* decide on the kind of error behaviour; and with some granularity at that. An extension would only ever call a common error function, with at least error code and error message (plus desired error_level and exception class if needed), whereas the "error configuration" not only decides on whether showing the error (now) but also if it is an error or an exception (new). For more details, please have a look at: http://wiki.php.net/rfc/enhanced_error_handling (which is by no means complete or error free itself) Regards HPO -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
