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

Re: Validation, error reports, and printing to stderr

From: Norman Walsh <ndw@nwalsh.com>
Date: Sun, 01 Jan 2012 08:21:41 -0500
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m24nwfy2vu.fsf@nwalsh.com>
Norman Walsh <ndw@nwalsh.com> writes:
> That's all well and good, but following David Cramer's recent
> messages, I think there's still something missing: how do the errors
> get reported?

It's not appropriate for the p:try to report errors that the p:catch
step catches. I'm tempted to try addressing this with a new step:

<p:declare-step type="cx:report-errors">
   <p:input port="source" primary="true"/>
   <p:input port="report" sequence="true"/>
   <p:output port="result"/>
   <p:option name="code"/>
   <p:option name="code-prefix"/>
   <p:option name="code-namespace"/>
   <p:option name="raise-error" select="'false'"/>

It simply copies source to result, like p:identity. If the report port
is not empty, then it sends that report to the error handler (I think
that'll put the messages on STDERR by default and it allows embedding
apps to do something else).

If raise-error is true, it acts like p:error and signals an error.

                                        Be seeing you,

Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 413 624 6676

Received on Sunday, 1 January 2012 13:22:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:09 UTC