kbss-cvut / s-pipes

Tool for execution of RDF-based pipelines.
GNU Lesser General Public License v3.0
4 stars 5 forks source link

Parse error for queries is not specific enough #231

Open blcham opened 4 months ago

blcham commented 4 months ago

In a module such as ApplyConstruct, when it fails due to a parse error, it says something like: image

The issue is that I am not able to find out why the parse error occurred, as I do not see the original query. The query should be logged as well (or maybe even pointing somehow to where the error exactly occurs so the user does not necessarily need to use an external editor to find it out from the line/column number).

A/C:

blcham commented 2 months ago

You can test it on pipeline https://github.com/kbss-cvut/s-pipes/blob/54dfb128d59584980a78be036965ab089d164dfa/doc/examples/hello-world/hello-world.sms.ttl#L53C1-L53C1 as follows: 1) deploy Spipes 2) run script hello-world 3) modify apply construct in https://github.com/kbss-cvut/s-pipes/blob/54dfb128d59584980a78be036965ab089d164dfa/doc/examples/hello-world/hello-world.sms.ttl#L53C1-L53C1 to make parse error in the query 4) run script hello-world again to see the parse error -- AND this is what needs to be improved

blcham commented 2 months ago

Another queries (validation queries) can be tested here

MSattrtand commented 2 months ago

How the log looks now using the constraint validation as an example: image image The image is split into two parts because the displayed query is long.

MSattrtand commented 2 months ago

Logs now output incorrect line when QueryParseException happens. Examples: image image image