# HG changeset patch # User Andreas Woess # Date 1411059722 -7200 # Node ID d48738c27e7d43494227879a9adddb3d40be5386 # Parent e165f422365030aa9482cba6ca890941de15ab5f Truffle: restore "opt fail" message on compilation failure diff -r e165f4223650 -r d48738c27e7d graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Thu Sep 18 19:00:23 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Thu Sep 18 19:02:02 2014 +0200 @@ -273,15 +273,16 @@ // Compilation was successful. } else { compilationPolicy.recordCompilationFailure(t); + + if (TruffleCompilationExceptionsAreThrown.getValue()) { + throw new OptimizationFailedException(t, rootNode); + } + logOptimizingFailed(this, t.getMessage()); if (t instanceof BailoutException) { - logOptimizingFailed(this, t.getMessage()); // Bailout => move on. } else if (TruffleCompilationExceptionsAreFatal.getValue()) { - logOptimizingFailed(this, t.getMessage()); t.printStackTrace(OUT); System.exit(-1); - } else if (TruffleCompilationExceptionsAreThrown.getValue()) { - throw new OptimizationFailedException(t, rootNode); } } }