Mercurial > hg > truffle
changeset 17424:34f6995b1d90
Truffle: don't silently ignore exceptions in the compiler if we want to throw them.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Mon, 13 Oct 2014 18:04:01 +0100 |
parents | 5c8660c0e760 |
children | 4263c17d4b8c |
files | graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Mon Oct 13 18:03:12 2014 +0100 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Mon Oct 13 18:04:01 2014 +0100 @@ -210,7 +210,13 @@ if (!mayBeAsynchronous) { try { future.get(); - } catch (InterruptedException | ExecutionException e) { + } catch (ExecutionException e) { + if (TruffleCompilationExceptionsAreThrown.getValue()) { + throw new RuntimeException(e.getCause()); + } else { + // silently ignored + } + } catch (InterruptedException e) { // silently ignored } }