diff --git a/src/org/ggp/base/validator/OPNFValidator.java b/src/org/ggp/base/validator/OPNFValidator.java index 48d407733..ff33ed6f4 100644 --- a/src/org/ggp/base/validator/OPNFValidator.java +++ b/src/org/ggp/base/validator/OPNFValidator.java @@ -11,13 +11,13 @@ public final class OPNFValidator implements GameValidator @Override public void checkValidity(Game theGame) throws ValidatorException { PrintStream stdout = System.out; - System.setOut(new PrintStream(new ByteArrayOutputStream())); + System.setOut(new PrintStream(new ByteArrayOutputStream())); try { if (OptimizingPropNetFactory.create(theGame.getRules()) == null) { throw new ValidatorException("Got null result from OPNF"); } } catch (Exception e) { - throw new ValidatorException("OPNF Exception: " + e); + throw new ValidatorException("OPNF Exception: " + e, e); } finally { System.setOut(stdout); } diff --git a/src/org/ggp/base/validator/ValidatorException.java b/src/org/ggp/base/validator/ValidatorException.java index a8c409fa7..dad5da6a0 100644 --- a/src/org/ggp/base/validator/ValidatorException.java +++ b/src/org/ggp/base/validator/ValidatorException.java @@ -5,4 +5,8 @@ public class ValidatorException extends Exception { public ValidatorException(String explanation) { super("Validator: " + explanation); } + + public ValidatorException(String explanation, Throwable t) { + super("Validator: " + explanation, t); + } }