Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -186,7 +186,11 @@ private TruffleObject getInitFunction(final String expandedPath) {
final Object initFunction = getContext().getEnv().importSymbol("@Init_" + getBaseName(expandedPath));

if (!(initFunction instanceof TruffleObject)) {
throw new UnsupportedOperationException("initFunction is not a TruffleObject but a " + initFunction.getClass());
if (initFunction == null) {
throw new UnsupportedOperationException("initFunction was null!");
} else {
throw new UnsupportedOperationException("initFunction is not a TruffleObject but a " + initFunction.getClass());
}
}

return (TruffleObject) initFunction;

0 comments on commit 24778d6

Please sign in to comment.