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'"/>
</p:declare-step>

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,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 413 624 6676
www.marklogic.com

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 1 January 2012 13:22:20 GMT