W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2012

Re: Calabash: get the p:error input out of an XProcException

From: mozer <xmlizer@gmail.com>
Date: Sun, 20 May 2012 16:15:03 +0200
Message-ID: <CAKdwC_N9keWYiCL0ty_gf2KO864VBni5OfY0jkOrT+3iikCB+g@mail.gmail.com>
To: Florent Georges <fgeorges@fgeorges.org>
Cc: XProc Dev <xproc-dev@w3.org>
2012/5/20 Florent Georges <fgeorges@fgeorges.org>

> On 20 May 2012 13:01, mozer wrote:
>
>  Hi,
>
> > p:error only exists in the case of a p:try
>
>   That's not what I read from [1]:
>
>    The p:error step generates a dynamic error using the input
>    provided to the step.
>    [...]
>    The error generated can be caught by a p:try just like any other
>    dynamic error.
>
>  The step throw an error, and one CAN catch it in a try/catch.  But
> if not, it is reported to the environment like any other error.  Did
> I miss something?
>

Ok fair enough, I mixed with the error port on p:catch
Apologize


>
> > you have probably a clear use case in mind when asking this and
> > there might be a limitation in Calabash from this side
>
>   I use XProc in Servlex [2] to write webapps.  A pipeline is mapped
> to a URI, in order to produce the webpage (or whatever content) for
> that URI.  You can also set a special pipeline to be an error handler
> which is automatically evaluated in case an error is thrown in one
> "regular" pipeline.
>
>  So one webapp can define its own error reporting mechanism, and pass
> more information to the error handler through the user-provided input
> to the p:error step.
>


Ok so you want to capture the content of the c:errors

I support this and you probably should open a bug (if it's not already
done) on GitHub

<c:errors xmlns:c="http://www.w3.org/ns/xproc-step"
          xmlns:p="http://www.w3.org/ns/xproc"
          xmlns:my="http://www.example.org/error">
 <c:error name="bad-document" type="p:error"
          code="my:unk12"><message>The document element is unknown.</message>
</c:error>

</c:errors>


>
>  Regards,
>
> --
> Florent Georges
> http://fgeorges.org/
> http://h2oconsulting.be/
>
> [1] http://www.w3.org/TR/xproc/#c.error
> [2] http://servlex.googlecode.com/
>
Received on Sunday, 20 May 2012 14:15:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 20 May 2012 14:15:34 GMT