You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by Patrick Grandjean <p....@gmail.com> on 2020/07/28 19:36:57 UTC

ScalaXMLInfosetOutputter.isError?

Hi,

I'm using

org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter

and get an exception when calling ScalaXMLInfosetOutputter.getResult(). It
says I should check if there is an error with isError. However there is no
ScalaXMLInfosetOutputter.isError function and
ScalaXMLInfosetOutputter.infosetOutputter.resultNode is private.

How to check for errors and get the underlying exception?

Patrick.

Re: ScalaXMLInfosetOutputter.isError?

Posted by Patrick Grandjean <p....@gmail.com>.
OK, got it. Thank you!

On Tue, Jul 28, 2020 at 3:56 PM Beckerle, Mike <mb...@tresys.com> wrote:

> When you call parse, you get a ParseResult back, and the InfosetOutputter
> has been called and populated with the created infoset.
>
> The isError call and any accumulated diagnostics are on the ParseResult
> object, I guess because those are not specific to whatever flavor of
> infoset outputter you choose to use, and frankly because InfosetOutputters
> came as a later addition to the API.
>
>
>
> ------------------------------
> *From:* Patrick Grandjean <p....@gmail.com>
> *Sent:* Tuesday, July 28, 2020 3:36 PM
> *To:* users@daffodil.apache.org <us...@daffodil.apache.org>
> *Subject:* ScalaXMLInfosetOutputter.isError?
>
> Hi,
>
> I'm using
>
> org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
>
> and get an exception when calling ScalaXMLInfosetOutputter.getResult(). It
> says I should check if there is an error with isError. However there is no
> ScalaXMLInfosetOutputter.isError function and
> ScalaXMLInfosetOutputter.infosetOutputter.resultNode is private.
>
> How to check for errors and get the underlying exception?
>
> Patrick.
>

Re: ScalaXMLInfosetOutputter.isError?

Posted by "Beckerle, Mike" <mb...@tresys.com>.
When you call parse, you get a ParseResult back, and the InfosetOutputter has been called and populated with the created infoset.

The isError call and any accumulated diagnostics are on the ParseResult object, I guess because those are not specific to whatever flavor of infoset outputter you choose to use, and frankly because InfosetOutputters came as a later addition to the API.



________________________________
From: Patrick Grandjean <p....@gmail.com>
Sent: Tuesday, July 28, 2020 3:36 PM
To: users@daffodil.apache.org <us...@daffodil.apache.org>
Subject: ScalaXMLInfosetOutputter.isError?

Hi,

I'm using

org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter

and get an exception when calling ScalaXMLInfosetOutputter.getResult(). It says I should check if there is an error with isError. However there is no ScalaXMLInfosetOutputter.isError function and ScalaXMLInfosetOutputter.infosetOutputter.resultNode is private.

How to check for errors and get the underlying exception?

Patrick.