- From: Florent Georges <fgeorges@fgeorges.org>
- Date: Sun, 24 Mar 2013 19:57:57 +0100
- To: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@le-tex.de>
- Cc: xproc-dev@w3.org
On 24 March 2013 19:37, Imsieke, Gerrit, le-tex wrote: > A use case: I want to make sure that a directory is empty > before I extract a zip to it (creating the directory if > necessary). So I’m deleting the directory before extraction, > and I don’t want to be bothered by an error if the directory > doesn’t exist. Try/catching this would feel too verbose, > although I admit that other errors, such as insufficient > privilieges, could be cought. I think that's precisely my point. If you want to ignore a precise error, because you know that it makes sense in your case to ignore THAT error, then catch that error. If something else happens, it will resolve to a proper error as it should do. If you ask to ignore the error and get a c:error instead then you have to use conditional structures, which are even more verbose... (is it a c:error document?, is it an error document for an expected error?, etc.) But it is true that I usually pay more attention than others to having proper error detection and handling. So it might just be me. Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/
Received on Sunday, 24 March 2013 18:58:44 UTC