Re: Proposal: raising errors

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
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Thursday, 19 April 2007 18:52:01 UTC