#29495 [Com]: New DOM and XSL classes should throw exceptions.
| From: | rodent at mighty dot co dot za | Date: | Fri, 28 Jan 2005 21:50:43 +0000 |
| Subject: | #29495 [Com]: New DOM and XSL classes should throw exceptions. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73008@lists.php.net to get a copy of this message | ||
ID: 29495
Comment by: rodent at mighty dot co dot za
Reported By: tony at marston-home dot demon dot co dot uk
Status: Suspended
Bug Type: Feature/Change Request
Operating System: *
PHP Version: 5.0.0
New Comment:
I don't really see why try/catch shouldn't be used for things like
loadXML.
A DOMException is raised for EVERYTHING but loadXML, or load.
Why should they be treated differently from the other DOM methods? It's
been a real pain porting my sablotron based XML/XSLT transformation code
to php5, and even with all the hacks I implemented, it's nowhere NEAR
the kind of error reporting I could do with the sablotron XSLT module.
I truly believe this should be reinvestigated.
Previous Comments:
------------------------------------------------------------------------
[2004-08-03 10:01:00] chregu@php.net
PHP 5.1 will have new error handling functionality (nothing written
yet, but will almost certainly not use try/catch but error handler
callbacks)
You have to wait for that...
------------------------------------------------------------------------
[2004-08-02 18:15:39] tony at marston-home dot demon dot co dot uk
Description:
------------
I have just started using the new DOM and XSL classes in PHP5, and one
thing I really find annoying is the difficulty in trapping errors. I
tried to use the new try... catch... syntax but this does not work.
I have worked out another way of detecting errors from these two
classes, but it is very messy. Can they be changed to use the new
try...cath... syntax?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29495&edit=1