Invalid RDF exception

Using the Java client, (com.complexible.stardog.api.IO.stream function), if the RDF is not valid, a plain StardogException occurs.

This is quite inconvenient, as in order to differentiate it from other possible exceptions (and thus follow a different automated approach), the message must be parsed and interpreted, but the message varies depending on the error (e.g. “Expected…, found:…” or “No separator character found in the URI”) and any modification on it would break the parsing logic.

Usage of an InvalidRdfException (being it itself an extension of StardogException for backwards compatibility) would be sweet!

1 Like

Hi,

Unfortunately this change would actually end up being fairly non-trivial as the error occurs server-side, so by the time it gets back to the client the specific Exception type has been stripped out, hence the generic StardogException wrapper.

Thank you for the suggestion, however. This is something that would be good for us to consider as we move forward. I will open up a ticket for it.