Jump to content


This topic is now archived and is closed to further replies.


DOM Error supression

Recommended Posts

if the XML file it is trying to call is not their it throws up errors how do I supress them so it continues the script and reports the error to me through mail().

$xdom = new domDocument;

Share this post

Link to post
Share on other sites
Well, normally you would use an custom errorhandler. But since you're into OOP you could also use exceptions. I've been meaning to get further into that myself.

You can use the '@' to supress an error, then use the returnvalue to check if your want to throw your custom exception.
    throw new MyCustomException('message');

I'm not sure that's the best way to that, like I said, I've been meaning to look into it.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.