mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-25 22:10:10 +00:00
Skip throwing an exception inside ResultsSetProperty
This commit is contained in:
parent
bd2d1559d1
commit
9cbc695fd7
@ -60,16 +60,13 @@ bool ResultsSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef proper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// attempts to assign to 'length' or an index should throw an exception
|
// attempts to assign to 'length' or an index should throw an exception
|
||||||
throw std::runtime_error("Results objects are readonly");
|
if (jsException) {
|
||||||
|
*jsException = RJSMakeError(ctx, "Results objects are readonly");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (std::invalid_argument &exp) {
|
catch (std::invalid_argument &exp) {
|
||||||
// for stol failure this could be another property that is handled externally, so ignore
|
// for stol failure this could be another property that is handled externally, so ignore
|
||||||
}
|
}
|
||||||
catch (std::exception &exp) {
|
|
||||||
if (jsException) {
|
|
||||||
*jsException = RJSMakeError(ctx, exp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user