Re: File utilities on exproc.org

Probably then the attribut should be "ignore-on-error" and the value being
the QName of the error (or a list of QNames ?), instead of "error-if-fail"

Mohamed


On Sun, Mar 24, 2013 at 7:57 PM, Florent Georges <fgeorges@fgeorges.org>wrote:

> 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 22:30:32 UTC