Skip throwing an exception inside ResultsSetProperty

This commit is contained in:
Scott Kyle 2015-10-21 15:59:11 -07:00
parent bd2d1559d1
commit 9cbc695fd7

View File

@ -60,16 +60,13 @@ bool ResultsSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef proper
}
// 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) {
// 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;
}