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

RE: Standard error codes - QNames or not?

From: <Toman_Vojtech@emc.com>
Date: Thu, 12 Jun 2008 03:02:31 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870B642E98@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-wg@w3.org>

> -----Original Message-----
> From: public-xml-processing-model-wg-request@w3.org 
> [mailto:public-xml-processing-model-wg-request@w3.org] On 
> Behalf Of Norman Walsh
> Sent: Tuesday, June 10, 2008 11:48 PM
> To: public-xml-processing-model-wg@w3.org
> Subject: Re: Standard error codes - QNames or not?
> 
> 
> | Related to this, can p:error be used for generating standard XProc
> | errors (such as err:XS0001)?
> 
> I'm of two minds. I could see forbidding them on principle, on the
> other hand, I don't see a lot of danger allowing them.
> 

If we allow it, it would make it possible to "rethrow" the standard
errors in the catch block, for instance, which may be a useful feature:

<p:try>
  <p:group>
    ...
  </p:group>
  <p:catch>
    <p:choose>
      <p:when test="... check for err:XD0003 ...">
        <!-- rethrow err:XD0003 -->
        <p:error code="err:XD0003">
          ...
        </p:error>
      </p:when>
      <p:otherwise>
        <!-- do something else -->
      </p:otherwise>
    </p:choose>
  </p:catch>
</p:try>


Regards
Vojtech
Received on Thursday, 12 June 2008 07:04:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 12 June 2008 07:04:19 GMT