From cb701e46eb76b5f8d8f8cb09a9a6a74f813ebc48 Mon Sep 17 00:00:00 2001 From: arjan Date: Mon, 23 Dec 2024 16:21:36 +0100 Subject: [PATCH] Betere wiki codes voor Shacl en RDF meldingen Zie #570 Minor: Verbetering. --- src/main/java/nl/imvertor/common/file/RdfFile.java | 4 ++-- src/main/java/nl/imvertor/common/file/ShaclFile.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/nl/imvertor/common/file/RdfFile.java b/src/main/java/nl/imvertor/common/file/RdfFile.java index c451f43c..43e18caa 100644 --- a/src/main/java/nl/imvertor/common/file/RdfFile.java +++ b/src/main/java/nl/imvertor/common/file/RdfFile.java @@ -90,10 +90,10 @@ public void parse(Configurator configurator) throws Exception { } else if (ext.equals("yml")) { // TODO - configurator.getRunner().error(logger,"Not a supported RDF file extension: " + ext,null,"rdf-uns","some-wiki-ref"); + configurator.getRunner().error(logger,"Not a supported RDF file extension: \"" + ext + "\"",null,"rdf-uns","RDF-NASRFE1"); } else - configurator.getRunner().fatal(logger,"Not a known RDF file extension: " + ext,null,"rdf-unk","some-wiki-ref"); + configurator.getRunner().fatal(logger,"Not a known RDF file extension: \"" + ext + "\"",null,"rdf-unk","RDF-NAKRFE1"); isOpen = true; } else { diff --git a/src/main/java/nl/imvertor/common/file/ShaclFile.java b/src/main/java/nl/imvertor/common/file/ShaclFile.java index a655e309..a8762dfc 100644 --- a/src/main/java/nl/imvertor/common/file/ShaclFile.java +++ b/src/main/java/nl/imvertor/common/file/ShaclFile.java @@ -113,14 +113,14 @@ public void parse(Configurator configurator, String ttlDataFilePath) throws Exce } catch (RepositoryException exception) { Throwable cause = exception.getCause(); if (cause instanceof ValidationException) { - runner.error(logger, "Shacl validator reports RDF error: " + exception.getMessage()); + runner.error(logger, "Shacl validator reports RDF error: \"" + exception.getMessage() + "\"","shacl-parse","SHACL-SVRRE1"); } else throw exception; } } } catch (Exception e) { - runner.warn(logger, "Shacl validator schema file \"" + getName() + "\" invalid, cannot validate RDF. " + e.getMessage(),"rdf-parse","some-wiki-ref"); + runner.warn(logger, "Shacl validator schema file \"" + getName() + "\" invalid, cannot validate RDF: \"" + e.getMessage() + "\"","rdf-parse","SHACL-SVSF1ICVR2"); } }