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] [EMAIL PROTECTED]

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

Reply via email to