RMLio / rmlmapper-java

The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources
http://rml.io
MIT License
147 stars 61 forks source link

FnO: provide better error messages if description is incomplete #136

Closed paulmillar closed 2 years ago

paulmillar commented 2 years ago

Motivation:

If certain key information is missing from the FnO description then rmlmapper reacts by returning an error message like:

Index 0 out of bounds for length 0

This error message provides no information about what is wrong, so the user has no way to understand how to fix the problem.

Modification:

Check that the predicate query returns at least one result before attempting to extract the expected result from the list. Throw an exception with a meaningful error message if the search yields results; for example:

<https://github.com/paulmillar/rml-extra-functions#param_base_uri> is missing https://w3id.org/function/ontology#type

Result:

The code provides a better error message if the FnO description is incomplete.

DylanVanAssche commented 2 years ago

Hi @paulmillar !

Thanks for your contribution and clear commit description! We will incorporate your commits in the next release.

DylanVanAssche commented 2 years ago

Available in the 4.14.3 release! Thanks for your contribution!