opengeospatial / bblocks-postprocess

0 stars 0 forks source link

Avoid stack trace errors where explicit error message is available and artefact can be identified (file, line) #12

Closed rob-metalinkage closed 9 months ago

rob-metalinkage commented 10 months ago

From @avillar :

This would be nice, but I need to identify which exceptions include locations and which don’t:

yaml errors (ScannerError, ParserError; JSON is loaded as yaml for validation) have a context_mark attribute with line and column that we could use. Done.

pyld JsonLdError gives enough information (not line+column, but points to the culprit). Done.

RDFLib relies on ValueError and SyntaxError, and those tend to be quite specific (line, column, term, etc.). Done

pyshacl is more difficult to handle: if the error is in the structure of the SHACL graph itself, the information in the exception may be enough, but if it’s inside one of the sh:sparql code, the text of the problematic SPARQL query is as much as we get (which could be enough). Done.

The rest of the exceptions are captured and their full traceback added to the report.

rob-metalinkage commented 10 months ago

Marked as done - captured details and thinking is need to revist