Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/OptimizationFailedException.java @ 17079:b06b4dee86d5
Truffle: keep the RootNode in OptimizationFailedException, so you can figure out what it was that failed.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Tue, 09 Sep 2014 20:21:11 +0100 |
parents | c4b1cf38002b |
children | a3464d86b5d2 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/OptimizationFailedException.java Tue Sep 09 20:19:23 2014 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/OptimizationFailedException.java Tue Sep 09 20:21:11 2014 +0100 @@ -24,10 +24,19 @@ */ package com.oracle.truffle.api; +import com.oracle.truffle.api.nodes.*; + public class OptimizationFailedException extends RuntimeException { - public OptimizationFailedException(Throwable cause) { + private final RootNode rootNode; + + public OptimizationFailedException(Throwable cause, RootNode rootNode) { super(cause); + this.rootNode = rootNode; + } + + public RootNode getRootNode() { + return rootNode; } private static final long serialVersionUID = -8797188744430210785L;