# HG changeset patch # User Christian Wimmer # Date 1443205495 25200 # Node ID d5793a65399677db3b4931b3f51b88fcfec9d00d # Parent 96fc3db824263e2acd77a1c081b1cb81baf69f02 Add new option TruffleCompilationExceptionsArePrinted diff -r 96fc3db82426 -r d5793a653996 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 Fri Sep 25 11:22:37 2015 -0700 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Fri Sep 25 11:24:55 2015 -0700 @@ -357,9 +357,11 @@ if (TruffleCompilationExceptionsAreThrown.getValue()) { throw new OptimizationFailedException(t, this); } - if (TruffleCompilationExceptionsAreFatal.getValue()) { + if (TruffleCompilationExceptionsArePrinted.getValue() || TruffleCompilationExceptionsAreFatal.getValue()) { printException(t); - System.exit(-1); + if (TruffleCompilationExceptionsAreFatal.getValue()) { + System.exit(-1); + } } } } diff -r 96fc3db82426 -r d5793a653996 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Fri Sep 25 11:22:37 2015 -0700 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Fri Sep 25 11:24:55 2015 -0700 @@ -144,6 +144,9 @@ @Option(help = "Treat compilation exceptions as fatal exceptions that will exit the application", type = OptionType.Debug) public static final OptionValue TruffleCompilationExceptionsAreFatal = new OptionValue<>(false); + @Option(help = "Prints the exception stack trace for compilation exceptions", type = OptionType.Debug) + public static final OptionValue TruffleCompilationExceptionsArePrinted = new OptionValue<>(false); + @Option(help = "Treat compilation exceptions as thrown runtime exceptions", type = OptionType.Debug) public static final OptionValue TruffleCompilationExceptionsAreThrown = new OptionValue<>(false);