RDFParserBase.reportError needs to check value for setting before checking isNonFatalError

Description

There are two levels of parse error handling in Sesame.

The initial level only requires that the ParseErrorListener receive a message.

The second level requires that if the ParseErrorListener will receive a message, that fatal errors, as defined by the user, will result in an exception and in failing the parse at that point.

Initially this was clumsily and incorrectly implemented for and hence some nonFatalErrors were triggering exceptions even if the setting was not supposed to fail.

To fix this, the first level will be defined as follows:

  • Only RioSetting<Boolean> supported for error conditions.

  • RioSetting<Boolean> == false will be defined as the setting where the error listener does not receive the error and the error is never fatal.

  • RioSetting<Boolean> == true will be defined as the setting where the error listener receives the error

The second level will be defined as follows:

  • RioSetting<Boolean> == true && isNonFatalError(RioSetting<Boolean>) == false will trigger both the error listener and a parse exception

  • RioSetting<Boolean> == true && isNonFatalError(RioSetting<Boolean>) == true will trigger only the error listener, and must never generate a parse exception

Environment

None

Status

Assignee

Peter Ansell

Reporter

Peter Ansell

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure