W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2007

Re: Proposal: raising errors

From: Alex Milowski <alex@milowski.org>
Date: Thu, 19 Apr 2007 11:51:56 -0700
Message-ID: <28d56ece0704191151q696ab6a7mc27549a05bd7cca7@mail.gmail.com>
To: "XMLProc List" <public-xml-processing-model-wg@w3.org>
On 4/19/07, Rui Lopes <rlopes@di.fc.ul.pt> wrote:
> Folks,
> Currently, steps are allowed to raise errors according to their
> semantics. This raises the question (no pun intended): why can't a step
> defined by a pipeline (e.g., contained in a library) raise errors
> according to its semantics? This could be a feature similar to XSLT's
> <xsl:message terminate="yes" />, or throwing exceptions in Java.
> Therefore, I would like to propose adding a new construct/micro-step to
> our language, p:error, with the following syntax:
> <p:declare-step type="p:error">
>    <p:output port="result"/>
>    <p:option name="errcode" required="yes"/>
>    <p:option name="description"/>
> </p:declare-step>

I'm  in favor of adding this.  It is a very good idea.

I assume the error it generates can be caught by a try/catch, right?

--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language

Bertrand Russell in a footnote of Principles of Mathematics
Received on Thursday, 19 April 2007 18:52:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:42 UTC