Open
Description
js script exception not being extracted properly after 19.x.x
we noticed that exceptions changes from having actual message (in this case we have some errors from handlebars.js), to having [object Object]
when upgrading from 19.3.1 to 21.0.0, looking at https://github.com/oracle/graaljs/blob/master/graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/UserScriptException.java it seems like getMessage
is changed between the versions...
specifically https://github.com/oracle/graaljs/blob/master/graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/UserScriptException.java#L125 returns null
, and that's from com.oracle.truffle.object.DynamicObjectLibraryImpl
@TruffleBoundary
@Override
public Object getOrDefault(DynamicObject object, Shape cachedShape, Object key, Object defaultValue) {
Property existing = ACCESS.getShape(object).getProperty(key);
if (existing != null) {
return getLocation(existing).get(object, false);
} else {
return defaultValue;
}
}
thinks DynamicObject<JSError>
has no constructor
....