Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message in catch incomplete for p:xinclude #303

Open
gimsieke opened this issue Apr 22, 2020 · 0 comments
Open

Error message in catch incomplete for p:xinclude #303

gimsieke opened this issue Apr 22, 2020 · 0 comments

Comments

@gimsieke
Copy link
Contributor

gimsieke commented Apr 22, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant