From 79943f05f4e9040da954f26f22113af9ff36f33f Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Sun, 6 Nov 2016 23:33:59 +1300 Subject: [PATCH] JENA-1197 return exit code 1 when there is a problem validating a file with riot --- jena-cmds/src/main/java/riotcmd/CmdLangParse.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jena-cmds/src/main/java/riotcmd/CmdLangParse.java b/jena-cmds/src/main/java/riotcmd/CmdLangParse.java index 59a1b1c6633..82f842c616b 100644 --- a/jena-cmds/src/main/java/riotcmd/CmdLangParse.java +++ b/jena-cmds/src/main/java/riotcmd/CmdLangParse.java @@ -285,6 +285,9 @@ else if ( RDFLanguages.isTriples(lang) ) // System.err.println("++++"+ex.getMessage()); if ( modLangParse.stopOnBadTerm() ) return ; + if ( modLangParse.validate() ) + // The error handler will print the exception. Here we throw it so that the command exit with 1 + throw new CmdException(); } finally { // Not close the output - we may write again to the underlying output stream in another call to parse a file. IO.close(in) ;