comparison truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ImplicitExplicitExportTest.java @ 22081:ff531952a91c

Making sure IOException from TruffleLanguage.parse method is correctly propagated to TruffleVM.eval caller.
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Fri, 14 Aug 2015 13:57:12 +0200
parents a7ca9e9a1d51
children 1e78795e7e6a
comparison
equal deleted inserted replaced
22080:65e9fbb40e51 22081:ff531952a91c
126 return new Ctx(env); 126 return new Ctx(env);
127 } 127 }
128 128
129 @Override 129 @Override
130 protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException { 130 protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException {
131 if (code.getCode().startsWith("parse=")) {
132 throw new IOException(code.getCode().substring(6));
133 }
131 return new ValueCallTarget(code, this); 134 return new ValueCallTarget(code, this);
132 } 135 }
133 136
134 @Override 137 @Override
135 protected Object findExportedSymbol(Ctx context, String globalName, boolean onlyExplicit) { 138 protected Object findExportedSymbol(Ctx context, String globalName, boolean onlyExplicit) {