static JsVariable wrapExceptionValue(RemoteObjectValue valueData,
WipValueBuilder valueBuilder) {
JsValue exceptionValue = valueBuilder.wrap(valueData, null);
final JsVariable property =
WipValueBuilder.createVariable(exceptionValue, EVALUATE_EXCEPTION_INNER_NAME);
JsObject wrapperValue = new JsObject() {
@Override
public RelayOk reloadHeavyValue(ReloadBiggerCallback callback,
SyncCallback syncCallback) {
throw new UnsupportedOperationException();
}
@Override
public boolean isTruncated() {
return false;
}
@Override
public String getValueString() {
return "<abnormal return>";
}
@Override
public Type getType() {
return Type.TYPE_OBJECT;
}
@Override
public JsObject asObject() {
return this;
}
@Override
public String getRefId() {
return null;
}
@Override
public RemoteValueMapping getRemoteValueMapping() {
return null;
}
@Override
public JsVariable getProperty(String name) {
if (name.equals(property.getName())) {
return property;
}
return null;
}