You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by rvesse <gi...@git.apache.org> on 2017/11/23 17:57:08 UTC
[GitHub] jena pull request #315: Add --stop-warnings to riot (JENA-1434)
GitHub user rvesse opened a pull request:
https://github.com/apache/jena/pull/315
Add --stop-warnings to riot (JENA-1434)
Add the option to allow riot to abort on warnings
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rvesse/jena JENA-1434
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/315.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #315
----
commit 1f7082cb88a4f796bf305d680ab49509049eec11
Author: Rob Vesse <rv...@apache.org>
Date: 2017-11-23T17:56:23Z
Add --stop-warnings to riot (JENA-1434)
Add the option to allow riot to abort on warnings
----
---
[GitHub] jena issue #315: Add --stop-warnings to riot (JENA-1434)
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:
https://github.com/apache/jena/pull/315
Reworked based on @afs's feedback in the JIRA
---
[GitHub] jena pull request #315: Add --stop-warnings to riot (JENA-1434)
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/315#discussion_r153043751
--- Diff: jena-cmds/src/main/java/riotcmd/CmdLangParse.java ---
@@ -195,7 +202,7 @@ protected void exec() {
// exit(1) if there were any errors.
--- End diff --
`// exit(1) if there were any errors or warnings.`
---
[GitHub] jena pull request #315: Add --stop-warnings to riot (JENA-1434)
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/315#discussion_r153043716
--- Diff: jena-arq/src/main/java/org/apache/jena/riot/system/ErrorHandlerFactory.java ---
@@ -221,6 +224,64 @@ public void fatal(String message, long line, long col) {
}
}
+ /** An error handler that logs message for errors and warnings and throw exceptions on either */
+ public static class ErrorHandlerTracking extends ErrorLogger implements ErrorHandler {
+ private final boolean failOnError, failOnWarning;
+ private long errorCount, warningCount;
+
+ public ErrorHandlerTracking(Logger log, boolean failOnError, boolean failOnWarning) {
--- End diff --
Suggestion: `ErrorHandlerTracking` wraps another `ErrorHandler` as argument and forwards all warning/error/fatal calls to that error handler after incrementing its counters. This makes the choice of how to respond to warning or error dependent on the argument `ErrorHandler`.
---
[GitHub] jena pull request #315: Add --stop-warnings to riot (JENA-1434)
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/jena/pull/315
---