Error message in catch incomplete for p:xinclude
gimsieke opened this issue · 0 comments
gimsieke commented
As reported by David Cramer on xproc-dev: When putting p:xinclude
in p:try
, the document on the error
port has very little details. I tried it with 1.2.1-99.
Running Untitled1.xpl
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
<p:output port="result" primary="true"/>
<p:try>
<p:group>
<p:load href="Untitled2.xml"/>
<p:xinclude/>
</p:group>
<p:catch name="catch">
<p:identity>
<p:input port="source">
<p:pipe port="error" step="catch"/>
</p:input>
</p:identity>
</p:catch>
</p:try>
</p:declare-step>
on Untitled1.xml
<doc>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="some.xml"/>
</doc>
results in
<c:errors xmlns:c="http://www.w3.org/ns/xproc-step">
<c:error href="file:/C:/cygwin/home/gerrit/Dev/Calabash/Untitled1.xpl" line="3" column="59">XProc error
err:XD0011</c:error>
</c:errors>
Without try/catch:
ERROR: Untitled1.xpl:8:20:XInclude resource error (some.xml) and no fallback provided.
ERROR: cause: err:XD0011:XProc error err:XD0011
ERROR: XInclude resource error (some.xml) and no fallback provided.
ERROR: Underlying exception: I/O error reported by XML parser processing file:/C:/cygwin/home/gerrit/Dev/Calabash/some.xml: C:\cygwin\home\gerrit\Dev\Calabash\some.xml (The system cannot find the file specified)
It would be nice if at least this level of information were available in the caught error message.