diff --git a/pom.xml b/pom.xml
index efa336a..ad6c4c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,6 +9,7 @@
utf-8
beta.faustedition.net:/var/www/dev
+ 10
@@ -210,6 +211,7 @@
-classpath
-Dphantomjs.binary=${phantomjs.binary}
+ -Dfaust.diplo.allowedFailures=${faust.diplo.allowedFailures}
net.faustedition.gen.DiplomaticConversion
diff --git a/src/main/java/net/faustedition/gen/DiplomaticConversion.java b/src/main/java/net/faustedition/gen/DiplomaticConversion.java
index 5561b1a..28b6960 100644
--- a/src/main/java/net/faustedition/gen/DiplomaticConversion.java
+++ b/src/main/java/net/faustedition/gen/DiplomaticConversion.java
@@ -176,7 +176,13 @@ public static void main(final String[] args) throws IOException {
if (failedConversions.length > 0) {
logger.log(Level.SEVERE, MessageFormat.format("Conversion of the following {0} pages failed:\n {1}",
failedConversions.length, Joiner.on("\n ").join(failedConversions)));
- System.exit(1);
+ int allowedFailures = Integer.parseUnsignedInt(System.getProperty("faust.diplo.allowedFailures", "0"));
+ if (failedConversions.length > allowedFailures) {
+ logger.log(Level.SEVERE, MessageFormat.format("These are more than the {0} tolerated failures.", allowedFailures));
+ System.exit(1);
+ } else {
+ logger.log(Level.INFO, MessageFormat.format("Up to {0} failures are tolerated.", allowedFailures));
+ }
}
} finally {
webServer.stop();