[
https://issues.apache.org/jira/browse/DAFFODIL-2721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17581936#comment-17581936
]
Steve Lawrence commented on DAFFODIL-2721:
------------------------------------------
Commit f836f33b9a76ef4c18a25f30b8844ea99b19f11e removed all the Boolean return
types in the InfosetOutputter API and expects java.lang.Exception for any
errors. This fixes the SAX/EXI regression.
Note that this issue is not fully resolved--we still need to make sure we
handle errors correctly in the InfosetInputter, and also determine if we want
to use custom exceptions (e.g. InfosetInputter/OutputterExcetion) for errors.
We probably do want to use custom exceptions, but there are some arguments
against it, which are documented in the InfosetOutputter trait.
> Standardize InfosetInputter and InfosetOutputter error handling
> ---------------------------------------------------------------
>
> Key: DAFFODIL-2721
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2721
> Project: Daffodil
> Issue Type: Bug
> Reporter: Steve Lawrence
> Priority: Critical
>
> The API for InfosetInputetr and InfosetOutputter is not well defined. In the
> InfosetOutputter API we have deprecated the use of the boolean return values,
> but have not changed the actual API.
> In both cases, implementations are expected to throw exceptions to report
> errors.
> In the InfosetOutputter, we catch all Exceptions and convert them to an SDE.
> In the InfosetInputter catches various kinds of exceptions based on
> InvalidInfosetExcpetion, but only documents
> NonTextFoundInSimpleContentException. It's not clear if try/catch'es wrap all
> calls to the InfosetInputter.
> We should double check that everything is correct. We may also want to create
> a specific exception for both the inputter and outputter that are consistent
> in naming (e.g. InfosetInputterException/InfosetOutputterException) and use
> these correctly and consistently.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)