Re: Error vocabulary

/ Alessandro Vernet <avernet@orbeon.com> was heard to say:
| On 4/20/07, Norman Walsh <ndw@nwalsh.com> wrote:
|> There's no way to expect complete uniformity of error reporting across
|> all steps, so I don't think we should try to make the error reporting
|> vocabulary very complicated.
|
| I wouldn't want to make this vocabulary overly complex, but I suggest
| we provide default way to specify where the error comes from (URI,
| line, column; e.g. information from a SAX Locator). This will
| encourage component developers to include this information in their
| errors, and in turn make the life of pipeline authors much easier.

Revised proposal:

<err:errors name="stepname" type="p:steptype">
  <error code="pfx:localname" href="uri" line="#" column="#" offset="#">
    any wf content
  </error>
</errors>

Consider the following step:

  <p:xslt name="foo">
    <p:input port="stylesheet"><p:document href="style.xsl"/></p:input>
  </p:xslt>

If the style.xsl file fails because of the followng xsl:message

  <xsl:message terminate="yes">
    <xsl:text>You blew it, </xsl:text>
    <xsl:value-of select="$user"/>
  </xsl:message>

The step might generate the following errors:

<err:errors name="foo" type="p:xslt">
  <error code="p:error" href="style.xsl" line="400" column="30">You blew it, kid</error>
</err:errors>

Where "p:error" is the error code for "general error".

The code, rhef, line, and column attributes are all optional.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | It is better to waste one's youth than
http://nwalsh.com/            | to do nothing with it at all.--Georges
                              | Courteline

Received on Tuesday, 24 April 2007 16:24:08 UTC